diff --git a/notebooks/wp5/glacier_distribution.ipynb b/notebooks/wp5/glacier_distribution.ipynb index a37a5b1..5ceb859 100644 --- a/notebooks/wp5/glacier_distribution.ipynb +++ b/notebooks/wp5/glacier_distribution.ipynb @@ -130,7 +130,9 @@ " date = date.where(~date.str.startswith(\"-\"))\n", " columns.append(pd.to_datetime(date))\n", "dates = pd.DataFrame(columns).mean()\n", - "gdf[\"decimal_year\"] = dates.year + (dates.dayofyear - 1) / (364 + dates.is_leap_year)\n", + "gdf[\"decimal_year\"] = dates.dtyear + (dates.dt.dayofyear - 1) / (\n", + " 364 + dates.dt.is_leap_year\n", + ")\n", "gdf[\"year\"] = dates.dt.year.astype(\"Int64\")" ] },