I know I can resample daily data, by month, like this:
df = data.resample('M')
But how do I resample by an arbitrary length, say 180?
df = data.resample('Days', 180) # six months # I am just guessing here
I know I can resample daily data, by month, like this:
df = data.resample('M')
But how do I resample by an arbitrary length, say 180?
df = data.resample('Days', 180) # six months # I am just guessing here
Use the rule directly
df = data.resample('180D')
For a list of possibilities on rules, please refer to the docs. There's a nice summary table in this link.