-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the solution you'd like
It will be great if we could show average pomodoro number when invoking --overall.
Describe alternatives you've considered
- UI: the information could be revealed on the terminal stdout, or calmap plot.
- type: average over all period, or average for weekdays only.
- code snippet candidates of implementation
the whole period
df['clock_count']
events[0].dt.floor('d')
events.groupby(events.dt.floor('d'))
events.index.dt.floor('d')
events['date']=events.index
events['date'].floor('d')
events.date = events['date'].floor('d')
events.groupby('date')
events.date.value_counts()
tai.sum()
tai = events.date.value_counts()
import numpy as np
np.average(tai.values.sum() )
tai.values.sum()
weekday only
pd.DataFrame(events)
events = pd.DataFrame(events)
events.date = events.index
events['date'] = events.index
events['weekday'] = events.date.dayofweek
new['date'] = new.index.floor('d')
events['date'] = events.index.floor('d')
events.head()
new = events[(events['weekday'] == 1 )| (events['weekday'] == 2 ) | (events['weekday'] == 3 ) | (events['weekday'] == 4 ) | (events['weekday'] == 0 )]
tai = new.groupby("date")
tai.count().sum()
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request