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.

Revisions

  1. ssrosa revised this gist Dec 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion hourly_means.py
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    #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 cols}).fillna(0)
    hourly_means = pd.DataFrame({col: hourly_mi[col] / hourly_mi['count'] for col in hourly_mi.columns}).fillna(0)
  2. ssrosa created this gist Dec 21, 2019.
    2 changes: 2 additions & 0 deletions hourly_means.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #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 cols}).fillna(0)