SPB Git

Repository Public

file_common.json 510 B 1 lines json

1{"path":"code/common.py","bytes":389,"totalLines":10,"from":1,"to":10,"text":"\nimport pandas as pd, numpy as np\ndef load():\n    df = pd.read_csv(\"data/us_macro_quarterly.csv\")\n    df.index = pd.PeriodIndex(df[\"period\"], freq=\"Q\")\n    df = df.iloc[1:].copy()          # first obs of infl/realint is a 0 placeholder (no lag available)\n    df[\"dinfl\"] = df[\"infl\"].diff()\n    df[\"growth\"] = np.log(df[\"realgdp\"]).diff()*400   # real GDP growth, annualised\n    return df\n","truncated":false}
Files main
Menu

Theme