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

BUG: Index.str.cat casting result always to object #56157

Merged
merged 9 commits into from
Dec 8, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 24, 2023

  • 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.

@@ -689,12 +690,15 @@ def cat(
out: Index | Series
if isinstance(self._orig, ABCIndex):
# add dtype for case that result is all-NA
dtype = None
if isna(result).all():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the comment in test_str_cat_all_na refer to the the object dtype here (othewise good to add a TODO comment here)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's the place where I found this being an issue

@mroeschke mroeschke added Dtype Conversions Unexpected or buggy dtype conversions Strings String extension data type and string data labels Nov 26, 2023
@phofl
Copy link
Member Author

phofl commented Dec 7, 2023

cc @mroeschke

@mroeschke mroeschke added this to the 2.2 milestone Dec 8, 2023
@mroeschke mroeschke merged commit a3626f2 into pandas-dev:main Dec 8, 2023
44 checks passed
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the str_cat branch December 8, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants