Created
November 11, 2019 16:22
-
-
Save joonro/8a4c609177c17afcb24028f2fdeed595 to your computer and use it in GitHub Desktop.
[pandas groupby date and time] #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# specify time frequency of groupby | |
groupby_freq = 'W' | |
gr = df.groupby( | |
pd.Grouper(key='date', freq=groupby_freq) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment