import pandas as pd

from leximpact_prepare_data.calib_and_copules import (
    get_calib,
    get_fake_data,
    pandas_to_vaex,
)
df = get_fake_data(var_name="rfr", exponent=1.5, divider=12)
df.plot()
print(f"Sum revkire : {df.revkire.sum():,}€ Sum rfr : {df.rfr.sum():,}€")
vaex_df = pandas_to_vaex(df)
get_calib??
calib = get_calib(vaex_df, "revkire", 100)
df_calib = pd.DataFrame(calib["buckets"])
df_calib
df_calib.plot(y="mean_tranche_var")