How to convert number to compact format for better visualization in graphs?
Numbers are coming from a series.
This is my annotation code:
for x, y in zip(t2.index,t2):
label="{:.0f}".format(y)
plt.annotate(label, # this is the text
(x,y), # this is the point to label
textcoords="offset points", # how to position the text
xytext=(0,10), # distance from text to points (x,y)
ha='center')