Skip to content

Commit

Permalink
user_stats: fix error with mode "OVER_TIME"
Browse files Browse the repository at this point in the history
Would look for # of actions in bin > instead of >= minimum actions.
  • Loading branch information
schlegelp committed Jun 7, 2019
1 parent 64e3c8f commit b84d8d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymaid/user_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def _extract_timestamps(ts, desc='Calc'):
for u in config.tqdm(all_timestamps.user.unique(), desc='Calc. total', disable=config.pbar_hide, leave=False):
# First count all minutes with minimum number of actions
minutes_counting = (all_timestamps[all_timestamps.user == u].set_index(
'timestamp', drop=False).timestamp.groupby(pd.Grouper(freq=bin_width)).count().to_frame() > minimum_actions)
'timestamp', drop=False).timestamp.groupby(pd.Grouper(freq=bin_width)).count().to_frame() >= minimum_actions)
# Then remove the minutes that have less than minimum actions
minutes_counting = minutes_counting[minutes_counting.timestamp]

Expand Down

0 comments on commit b84d8d0

Please sign in to comment.