Skip to content

Instantly share code, notes, and snippets.

@stestagg
Created March 28, 2018 12:35
Show Gist options
  • Save stestagg/622444940357f2d8d9ed7b040d387273 to your computer and use it in GitHub Desktop.
Save stestagg/622444940357f2d8d9ed7b040d387273 to your computer and use it in GitHub Desktop.
last_year = 2008
YEAR_COL = '1'
COUNT_COL = '2'
year_totals, bins = np.histogram(
one_grams[YEAR_COL],
density=False,
range=(0, last_year+1),
bins=last_year + 1,
weights=one_grams[COUNT_COL]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment