Skip to content

Conversation

jbrockmendel
Copy link
Member

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

analogous to #62149


if dtype is None:
dtype = StringDtype(storage="pyarrow", na_value=libmissing.NA)
self._dtype = dtype
Copy link
Member

Choose a reason for hiding this comment

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

Worth raising if dtype.storage != "pyarrow"?

Copy link
Member

Choose a reason for hiding this comment

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

Or should __init__ only accept na_value: libmissing.NAType | np.nan = libmissing.NA?

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 think accepting dtype is more idiomatic. I’d be ok with adding that check but don’t think it necessary

@mroeschke mroeschke added the Refactor Internal refactoring of code label Aug 22, 2025
@mroeschke mroeschke added this to the 3.0 milestone Aug 22, 2025
@mroeschke mroeschke merged commit f84ba18 into pandas-dev:main Aug 22, 2025
42 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-fewer-strings-pa branch August 22, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Internal refactoring of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants