Line 20-24 of Chapter-6/app.py is currently:
df = (
df.append({"Year": MIN_YR - 1}, ignore_index=True)
.sort_values("Year", ignore_index=True)
.fillna(0)
)
but df.append is not available in Pandas 2.2.2. This code works with that version of Pandas:
df = (
pd.concat([df, pd.DataFrame([{"Year": MIN_YR - 1}])], ignore_index=True)
.sort_values("Year", ignore_index=True)
.fillna(0)
)
Line 20-24 of
Chapter-6/app.pyis currently:but
df.appendis not available in Pandas 2.2.2. This code works with that version of Pandas: