I want to draw a vertical line for a specific month date (period).
The dataframe I want to draw (named complete) look like that :
ENTRETIEN FRAIS_FINANCIER
month
2017-10 57.48 311.34
2017-11 0.00 0.00
2017-12 0.00 0.00
2018-01 0.00 0.00
2018-02 57.48 311.34
2018-03 57.48 311.34
2018-04 0.00 368.82
2018-05 0.00 368.82
2018-06 0.00 368.82
2018-07 0.00 368.82
2018-08 0.00 368.82
2018-09 0.00 368.82
2018-10 0.00 0.00
2018-11 0.00 368.82
2018-12 0.00 368.82
2019-01 57.48 311.34
2019-02 57.48 311.34
2019-03 57.48 311.34
2019-04 57.48 311.34
2019-05 0.00 368.82
2019-06 0.00 368.82
2019-07 0.00 368.82
2019-08 0.00 368.82
2019-09 0.00 368.82
2019-10 0.00 0.00
2019-11 0.00 368.82
Here is my code :
ax = complete.plot(kind='bar', stacked=True)
# Limite
plt.axvline(max(complete.index), color="red", linestyle="--", lw=2, label="Limite", ax=ax)
But with the code I have this error :
TypeError: '>' not supported between instances of 'float' and 'Period'
I can't figure out how to do it properly, can you help me ?