Add source example files

This commit is contained in:
2025-07-12 18:43:56 +02:00
parent 11d6846f49
commit d0bcfcf8f1
62 changed files with 40101 additions and 161 deletions

View File

@ -0,0 +1,12 @@
import pandas as pd
from matplotlib import pyplot
from matplotlib.axes import Axes
df = pd.read_excel("sample-data-food-sales.xlsx", sheet_name="FoodSales")
groups = df.groupby(["Region", "City"])
averages = groups.mean(numeric_only=True)
axis: Axes = averages.plot.bar(rot=0)
for p in axis.patches:
axis.annotate(f"{p.get_height():.1f}", (p.get_x() + 0.05, p.get_height() + 5), rotation=90)
pyplot.show()