Skip to content

BUG: Inserting ndim=0 array does not infer string dtype #55366

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

Merged
merged 9 commits into from
Oct 4, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Oct 3, 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.

@phofl phofl added this to the 2.1.2 milestone Oct 3, 2023
from pandas.core.arrays.string_ import StringDtype

dtype = StringDtype("pyarrow_numpy")
data = dtype.construct_array_type()._from_sequence_of_strings(
Copy link
Member

Choose a reason for hiding this comment

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

Can we not re-use construct_1d_arraylike_from_scalar and just pass in StringDtype("pyarrow_numpy")?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@mroeschke mroeschke added Dtype Conversions Unexpected or buggy dtype conversions Arrow pyarrow functionality labels Oct 3, 2023
@phofl phofl merged commit 6b84daa into pandas-dev:main Oct 4, 2023
@phofl phofl deleted the indexing_ndim_0 branch October 4, 2023 08:39
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Oct 4, 2023
lithomas1 pushed a commit that referenced this pull request Oct 4, 2023
…not infer string dtype) (#55396)

Backport PR #55366: BUG: Inserting ndim=0 array does not infer string dtype

Co-authored-by: Patrick Hoefler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants