This is my data frame I\'m trying to plot:
my_dic = {\'stats\': {\'apr\': 23083904,
\'may\': 16786816,
\'june\'
Adding this line helps to get numbers in a plain format but with ',' which looks much nicer:
ax.get_yaxis().set_major_formatter(
matplotlib.ticker.FuncFormatter(lambda x, p: format(int(x), ',')))
And then I can use int(x)/
to convert to million or thousand as I wish:
Since you already using pandas
import matplotlib.pyplot as plt
my_df.plot(kind='bar')
plt.ticklabel_format(style='plain', axis='y')