I would like to change the format of my x ticks labels. They are generated thanks to :
range = pd.cut(df['Notional EUR'],
bins=[0, 250000, 500000, 1000000, 5000000, 10000000, 50000000, 100000000, 500000000])
range = range.value_counts(sort=False)
range = range.to_frame()
range.columns = ["Effectif"]
chart = sns.barplot(data=range,
color = '#F80116',
x=range.index.values,
y="Effectif")
I would like to format it as follow : (0, 250K]
instead of (0, 250000]
.
I tried several ways such as : xlabels = [f'({l:.2f}, {r:.2f}]'+'K' for l, r in chart.get_xticks()/1000]
but without success...
Here is the chart concerned :
Thanks for your help.