I have the following dataframe and am trying to plot it, so that it shows in the x-axis the index data from 8-19.
If I do df.plot() no labels are shown at a
df.plot()
If you want to have string as xticks one possible solution is:
df = df.reset_index() df = df.rename(columns={"index":"hour"}) ax = df.plot(xticks=df.index) ax.set_xticklabels(df["hour"]);