Skip to content

Commit

Permalink
Merge pull request #245 from Data4Democracy/quick_fix
Browse files Browse the repository at this point in the history
Hotfix to close v2.0: Remove requirement to aggregate by week.
  • Loading branch information
bpben authored Mar 18, 2019
2 parents 1dc2bee + 9be385c commit 8f0e90f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/make_canon_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def read_records(fp, date_col, id_col, agg='week'):

# aggregate
print("aggregating by ", agg)
df[agg] = df[date_col].apply(lambda x: getattr(x, agg))
# df[agg] = df[date_col].apply(lambda x: getattr(x, agg))
df_g = df.groupby([id_col, 'year', agg]).size()

return(df_g)
Expand Down

0 comments on commit 8f0e90f

Please sign in to comment.