Вот краткий рабочий пример, с которого можно начать:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Generate repeatable results
np.random.seed(0)
# Generate a bunch of noisy looking data and shuffle it
data = np.append(np.random.normal(200, 100, 990), np.random.normal(1200, 300, 10))
np.random.shuffle(data)
# Make the dataframe
df = pd.DataFrame({'Date': np.arange(1000), 'data_values': data})
df['over_value'] = df['data_values'] > 1200
# Create a plot
f, ax = plt.subplots()
df.plot(x='Date', y='data_values', ax=ax, legend=None)
# Iterate through the relevant rows and annotate
for _, row in df.query('over_value').iterrows():
ax.annotate(int(row['data_values']),
xy=(row['Date'], row['data_values']))
plt.show()
![enter image description here](https://i.stack.imgur.com/8VF74.png)