I'm trying to convert M1 OHLC data to M15 using the pandas resample function but not getting anywhere, this is what I've got:
df = pd.read_csv("EURUSD.csv")
df = df.set_index("DatetimeIndex")
print("\tDone!")
df = df.resample('1H').agg({'Open': 'first',
'High': 'max',
'Low': 'min',
'Close': 'last'})
I get the error
TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index'
I tried removing the .set_index
and it gave another error saying can't do RangeIndex
the data I have looks like this: