'Pandas resample does not give expected result

I have a dataframe (dislayed below) which I want to aggregate on the daily. To accomplish this, I set the datetime column as index and use df = df.resample('D').agg(max) such that I can aggregate on the daily. However, it does not seem to work at all. What is wrong with my approach?

original dataframe:

original dataframe

resulting dataframe:

resulting dataframe



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source