I am analysing extreme weather events. My Dataframe is called df and looks like this:
| Date | Qm |
|------------|--------------|
| 1993-01-01 | 4881.977061 |
| 1993-02-01 | 4024.396839 |
| 1993-03-01 | 3833.664650 |
| 1993-04-01 | 4981.192526 |
| 1993-05-01 | 6286.879798 |
| 1993-06-01 | 6939.726070 |
| 1993-07-01 | 6492.936065 |
| ... | ... |
I want to know whether the extreme events happened in the same year as an outlier measured. Thus, I did my boxplot using seaborn:
# Qm boxplot analysis
boxplot = sns.boxplot(x=df.index.month,y=df['Qm'])
plt.show()
Now, I would like to present within the same figure the years corresponding to the outliers. Hence, label them with their date.
I have checked in multiple libraries that include boxplots, but there is no clue on how to label them.
PD: I used seaborn in this example, but any library that could help will be highly appreciated
Thanks!