I am visualizing my data in bar, column, line and scatter chart using matplotlib for the first time. I am getting an error whenever I am mentioning the x and y axis. Here is my code below for all charts,
df.plot.bar(pd.DatetimeIndex(df['date']), y=df[value])
df.plot.bar(pd.DatetimeIndex(df['date']), y=df[value])
df.plot.line(pd.DatetimeIndex(df['date']), y=df[value])
df.plot.scatter(x=pd.DatetimeIndex(df['date']), y=df[value])
plt.show()
I have found similar issue in datetime index KeyError: 'the label [2000-01-03 00:00:00] is not in the [index]'. But it is not solving my problem.