Skip to content

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
@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