Skip to content

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Jan 26, 2025

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Want this in 2.3 for #60795.

@rhshadrach rhshadrach added Bug Internals Related to non-user accessible pandas implementation labels Jan 26, 2025
@rhshadrach rhshadrach added this to the 2.3 milestone Jan 26, 2025
@rhshadrach rhshadrach requested a review from WillAyd as a code owner January 26, 2025 14:03
Comment on lines +146 to +147
columns=pd.Index(list("ABCD")),
index=pd.Index([f"i-{i}" for i in range(30)]),
Copy link
Member Author

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.

Copy link
Member

@WillAyd WillAyd left a 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):
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@WillAyd WillAyd left a 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?

@jorisvandenbossche jorisvandenbossche merged commit 8973c55 into pandas-dev:main Jan 28, 2025
42 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Jan 28, 2025
@rhshadrach rhshadrach deleted the fix_validator_empty branch January 28, 2025 17:26
mroeschke pushed a commit that referenced this pull request Jan 28, 2025
…mpty object dtype) (#60808)

Backport PR #60796: BUG: is_*_array returns true on empty object dtype

Co-authored-by: Richard Shadrach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants