I have a similar dataframe:
x | y
1 | 1
3 | 1
3 | 1
4 | 1
5 | 2
5 | 2
9 | 2
8 | 2
And I want to resample this dataframe such that x values with the same y value is averaged. In other words:
x | y
(1+3+3+4)/4 | 1
(5+5+9+8)/4 | 2
I've looked into the pandas.DataFrame.resample function, but not sure how to do this without timestamps.