From fd46c46604298008874ed00a40245cdeb36073f7 Mon Sep 17 00:00:00 2001 From: Yulia Neitzel Date: Wed, 18 Dec 2024 13:40:26 +0100 Subject: [PATCH] [FIX] Update obsolete code --- Chapter-6/app.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Chapter-6/app.py b/Chapter-6/app.py index cc3d772..46170c2 100644 --- a/Chapter-6/app.py +++ b/Chapter-6/app.py @@ -17,11 +17,10 @@ START_YR = 2007 # since data is as of year end, need to add start year -df = ( - df.append({"Year": MIN_YR - 1}, ignore_index=True) - .sort_values("Year", ignore_index=True) - .fillna(0) -) +df = pd.concat([ + df, + pd.DataFrame({"Year": [MIN_YR - 1]}) +], ignore_index=True).sort_values("Year", ignore_index=True).fillna(0) COLORS = { "cash": "#3cb521",