Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request][--overall] show average pomodoro number #40

Open
tai271828 opened this issue Dec 8, 2020 · 0 comments
Open

[Feature Request][--overall] show average pomodoro number #40

tai271828 opened this issue Dec 8, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@tai271828
Copy link
Collaborator

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

  1. UI: the information could be revealed on the terminal stdout, or calmap plot.
  2. type: average over all period, or average for weekdays only.
  3. 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()

@tai271828 tai271828 added the enhancement New feature or request label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant