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

Conversation

amotl
Copy link
Member

@amotl amotl commented Jun 18, 2024

About

Accompany and complete:

Conclude and finalize fixes:

Details

groupby.mean() has numeric_only= argument whose default value was True in the past but since pandas 2.0, its default value is False.

An implication is that string columns are not dropped when a statistical method such as mean or std is called on the groupby object (as was done in the past). To solve the issue, pass numeric_only=True.

-- https://stackoverflow.com/a/76597931

> `groupby.mean()` has `numeric_only=` argument whose default value was
> `True` in the past but since pandas 2.0, its default value is `False`.
>
> An implication is that string columns are not dropped when a
> statistical method such as `mean` or `std` is called on the `groupby`
> object (as was done in the past). To solve the issue, pass
> `numeric_only=True`.
>
> -- https://stackoverflow.com/a/76597931
@hammerhead hammerhead merged commit 1effc38 into main Jun 19, 2024
2 checks passed
@hammerhead hammerhead deleted the amo/timeseries-pandas2-aftermath branch June 19, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants