1

I have a dataframe with 5min values and I want to downsample it to 30min using the highest value? It is a price dataframe and I need to know the highest prices by time.

I tried

df = df.resample(‘30T’).max()

And it returns me the last value instead of the highest.

  • 1
    Welcome to SO. Please review [ask] and provide a [mcve], including a sample input/output and your current attempt. – user3483203 Aug 31 '19 at 15:01
  • Check this link. I think this has what you need https://stackoverflow.com/questions/44789716/pandas-resample-dataframe-column-get-discrete-feature-that-corresponds-to-max – moys Aug 31 '19 at 16:11

0 Answers0