I have a pandas dataframe
jul.head()
which contains
However, when I try to plot my data, I can\'t figure out how to show my i
This should work fine in pandas 0.20. For some reason newer versions of pandas kill the ticklabels.
import matplotlib.pyplot as plt
import pandas as pd
df = pd.DataFrame({"value" : [0.1, 0.3, 0.2]}, index=list("ABC"))
ax = df.plot(y='value', label='july')
ax.set_xlabel("pandas "+pd.__version__, fontsize=12)
plt.show()
v 0.20.1
v 0.23.1
You can set the ticklabels yourself in pandas 0.23
ax.set_xticks(range(len(df.index)))
ax.set_xticklabels(df.index)
Or you can use matplotlib for plotting, as shown e.g. in this answer.