I have been trying to get a proper documentation for the freq arguments associated with pandas. For example to resample a dataframe we can do something like
df.resample(rule='W', how='sum')
which will resample this weekly. I was wondering what are the other options and how can I define custom frequency/rules.
EDIT : To clarify I am looking at what are the other legal options for rule
http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases
And, almost immediately below that: W-SAT and others.
I'll admit, links to this particular piece of documentation are pretty scarce. More general frequencies can be represented by supplying a DateOffset
instance. Even more general resamplings can be done via groupby
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With