Skip to content

Instantly share code, notes, and snippets.

@ssrosa
Last active December 21, 2019 23:04
Show Gist options
  • Select an option

  • Save ssrosa/8c5a68a1bb9b56c0d448e2065fe341e1 to your computer and use it in GitHub Desktop.

Select an option

Save ssrosa/8c5a68a1bb9b56c0d448e2065fe341e1 to your computer and use it in GitHub Desktop.
#Divide each column by its number of stories to get the mean
hourly_means = pd.DataFrame({col: hourly_mi[col] / hourly_mi['count'] for col in hourly_mi.columns}).fillna(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment