You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug seems to be occurring at (roughly) L7016 of pandas/core/generic.py, https://github.com/pandas-dev/pandas/blob/main/pandas/core/generic.py#L7016 . It seems to occur primarily because pandas/core/dtypes/inference.py:is_scalar doesn't recognize anything of type ellipsis as a scalar (i.e., when passed something of the ellipsis type, is_scalar returns False).
The -- kind of hacky? -- fix of including to_replace is Ellipsis as one of the or-ed conditions does appear to work. A more elegant fix seems to require editing something much lower-level. If the former is acceptable, I'm happy to open a PR with that change.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Based by SO question, I cannot replace by Ellipsis:
Expected Behavior
Installed Versions
The text was updated successfully, but these errors were encountered: