From dca84f5614317e13a934ca6607b8eadba4bfa5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 19 Apr 2021 15:55:22 +0200 Subject: [PATCH] Pandas --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ddf2b0d..c64fd03 100644 --- a/README.md +++ b/README.md @@ -3398,7 +3398,7 @@ def wrangle_data(covid, dow, gold, bitcoin): df = pd.concat([dow, gold, bitcoin], axis=1) df = df.sort_index().interpolate() df = df.rolling(10, min_periods=1, center=True).mean() - df = df.loc['2020-02-23':].iloc[:-2] + df = df.loc['2020-02-23':'2020-11-25'] df = (df / df.iloc[0]) * 100 return pd.concat([covid, df], axis=1, join='inner') diff --git a/index.html b/index.html index 8131202..0042650 100644 --- a/index.html +++ b/index.html @@ -2901,7 +2901,7 @@ line(df, x='Date', y= df = pd.concat([dow, gold, bitcoin], axis=1) df = df.sort_index().interpolate() df = df.rolling(10, min_periods=1, center=True).mean() - df = df.loc['2020-02-23':].iloc[:-2] + df = df.loc['2020-02-23':'2020-11-25'] df = (df / df.iloc[0]) * 100 return pd.concat([covid, df], axis=1, join='inner')