Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time Series: More compatibility with pandas 2.0 #496

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion topic/timeseries/exploratory_data_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
"df_berlin.index = pd.to_datetime(df_berlin.index)\n",
"\n",
"# Now aggregate to daily averages\n",
"df_berlin_daily_avg = df_berlin.resample('D').mean()\n",
"df_berlin_daily_avg = df_berlin.resample('D').mean(numeric_only=True)\n",
"\n",
"df_berlin_daily_avg.reset_index(inplace=True)\n",
"\n",
Expand Down
3 changes: 0 additions & 3 deletions topic/timeseries/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@ def test_notebook(notebook):
raise pytest.skip(f"Kaggle dataset can not be tested "
f"without authentication: {notebook.name}")

if notebook.name in ["exploratory_data_analysis.ipynb", "time-series-decomposition.ipynb"]:
raise pytest.skip(f"Notebook is not compatible with pandas 2.x: {notebook.name}")

with testbook(notebook) as tb:
tb.execute()
2 changes: 1 addition & 1 deletion topic/timeseries/time-series-decomposition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@
"df_berlin.index = pd.to_datetime(df_berlin.index)\n",
"\n",
"# Now aggregate to daily averages\n",
"df_berlin_daily_avg = df_berlin.resample('D').mean()\n",
"df_berlin_daily_avg = df_berlin.resample('D').mean(numeric_only=True)\n",
"\n",
"df_berlin_daily_avg.reset_index(inplace=True)\n",
"\n",
Expand Down