-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
BUG: is_*_array returns true on empty object dtype #60796
BUG: is_*_array returns true on empty object dtype #60796
Conversation
columns=pd.Index(list("ABCD")), | ||
index=pd.Index([f"i-{i}" for i in range(30)]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't expect this, but previous behavior looks incorrect. With infer_string=True
, was not inferring str
and now it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comment but otherwise lgtm
"is_timedelta_or_timedelta64_array", | ||
], | ||
) | ||
def test_is_dtype_array_empty_obj(self, func): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have test coverage for is_object_array
returning True
explicitly elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing an is_object_array
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah my mistake - I think I got tripped up the PR title. That should say is_*_array returns false on empty object dtype
instead of true
right? Or am I overlooking something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it depends how you want the title of a PR constructed. The bug is that it returns true, this PR's title is a statement of the bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @jorisvandenbossche mind taking a look?
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Want this in 2.3 for #60795.