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)
