News for hackers. Stuff that matters.
Re:FireDucks: Pandas but 100x Faster by short_sells_poo on Wednesday November 20, 2024 @10:27AM (#42194715)
It's actually much simpler than that. Assuming the index of the dataframe DF is composed of timestamps (which is normal for timeseries):

df.resample("BME").sum()

Done. One line of code and it is quite obvious what it is doing - with perhaps the small exception of BME, but if you want max readability you could do:

df.resample(pd.offsets.BusinessMonthEnd()).sum()

This is why people use pandas.

There are no comments on this comment yet.