How can I draw bar graph in python on aggregated data?
import pandas as pd

df = pd.Series(data=[11, 8, 28, 1, 70, 13, 45],
               index=[22, 23, 27, 28, 29, 30, 31],
               name="age").rename_axis("age", axis=0)

x = df.index
y = df.values

plt.bar(x, y)