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,16 @@
import pandas as pd
from pandas import DataFrame
from source.pandas import get_dataframe
if __name__ == '__main__':
data: DataFrame = get_dataframe()
data["height_cm"] = data["height"].map(lambda h: h * 2.54)
print(data.groupby("sex").quantile([0.5], numeric_only=True))
means = data.groupby("sex").mean(["height", "earn"])
means["height_cm"] = means["height"].map(lambda h: h * 2.54)
stdevs = data.groupby("sex").std(numeric_only=True)
stdevs["height_cm"] = stdevs["height"].map(lambda h: h * 2.54)
print(data)
print(means)
print(stdevs)