Skip to content

Commit

Permalink
Merge pull request #49 from geo-smart/time-series-warning
Browse files Browse the repository at this point in the history
fixed warnings in time_series
  • Loading branch information
srinijammula authored Dec 15, 2024
2 parents a8169d2 + eec115a commit 9b6c86f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/chapters/time_series.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
" \n",
" # grouped = df.groupby(['lat', 'lon', 'water_year'], group_keys=False)\n",
" for column in columns_to_be_cumulated:\n",
" df[f'cumulative_{column}'] = grouped.apply(lambda group: group.sort_values('date')[column].cumsum())\n",
" df[f'cumulative_{column}'] = grouped.apply(lambda group: group.sort_values('date')[column].cumsum(), include_groups=False)\n",
"\n",
" print(\"This is the dataframe after cumulative columns are added\")\n",
" print(df.columns)\n",
Expand Down

0 comments on commit 9b6c86f

Please sign in to comment.