i m trying to make candlesticks with matplotlib. got a csv file like this.
,CloseTime ,OpenPrice,HighPrice, LowPrice, ClosePrice, Volume, Adj Volume
0,1523836800,503.0, 535.01184,497.09033, 533.72046, 13180.739, 6791510.5
1,1523923200,533.72046,538.0, 498.31665, 511.78436, 9553.387, 4888143.5
2,1524009600,512.1794, 521.491, 500.9132, 503.0, 5921.6836, 3020385.5
3,1524096000,502.0, 527.3317, 502.0, 524.60547, 8402.214, 4344271.5
4,1524182400,526.1176, 570.1495, 519.5058, 568.43866, 10088.153, 5501865.0
my code is at below
import matplotlib.pyplot as plt
from matplotlib import style
import pandas as pd
df=pd.read_csv('eth.csv', parse_dates=True,index_col=0)
df_ohcl=df['ClosePrice'].resample('10D').ohlc()
df_volume=df['Volume'].resample('10D').sum()
print(df_ohcl())```
when i run program i get an answer like
TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Int64Index'
how can i fix this.thanks for helping me