I have data set call 'df' and trying to use one of column data as a axis of graph.
The data appear on a graph as 11.58 so I would like to change it to one decimal place which is 11.5
Here is the code I've got.
if df['gear'] is no None:
ax2.text[10,5, df['gear'][0], size=5, weight='bold', color='black', rotation=0., ha="center", va="center")
To change it to one decimal place, I've tried it as below but it won't work
if df['gear'] is no None:
ax2.text[10,5, df['gear'][0], "{:.1f}", size=5, weight='bold', color='black', rotation=0., ha="center", va="center")
can someone please tell me how to change decimal point in ax.text. Thanks