Resample Pandas Dataframe with “bin size”/“frequency”
问题 9I have a multi-indexed dataframe which I would like to resample to reduce the frequency of datapoints by a factor of 3 (meaning that every 3 rows become one). This: time value ID measurement ET001 0 0 2 1 0.15 3 2 0.3 4 3 0.45 3 4 0.6 3 5 0.75 2 6 0.9 3 ET002 0 0 2 1 0.16 5 2 0.32 4 3 0.45 3 4 0.6 3 5 0.75 2 I want to turn into this: time value ID measurement ET001 0 0.15 3 1 0.6 2.7 2 0.9 3 ET002 0 0.16 3.7 1 0.6 2.7 I tried to turn my time column into a pandas datetime index like so, and