Skip to content

Fix: StringArray non-extensible due to inconsisent assertion #34310

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

Closed
wants to merge 9 commits into from

Conversation

sbrugman
Copy link
Contributor

@sbrugman sbrugman commented May 22, 2020

Fix for #34309

@sbrugman sbrugman changed the title Patch 1 Fix: StringArray non-extensible due to inconsisent assertion May 22, 2020
@jreback jreback added the ExtensionArray Extending pandas with custom dtypes or arrays. label May 25, 2020
@sbrugman sbrugman requested a review from dsaxton May 25, 2020 19:09
@sbrugman
Copy link
Contributor Author

@dsaxton Thanks for your review. I've processed your proposed changes and added an additional string dtype test.

Copy link
Member

@dsaxton dsaxton left a comment

Choose a reason for hiding this comment

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

Tiny nit, but otherwise LGTM

@sbrugman
Copy link
Contributor Author

Tiny nit, but otherwise LGTM

Done

@jreback jreback added this to the 1.1 milestone May 26, 2020
@jreback
Copy link
Contributor

jreback commented May 26, 2020

@TomAugspurger
Copy link
Contributor

I think the issue has an ongoing discussion that needs to be resolved.

@jreback jreback removed this from the 1.1 milestone Jul 9, 2020
@jbrockmendel jbrockmendel added the Strings String extension data type and string data label Sep 14, 2020
@jbrockmendel
Copy link
Member

@sbrugman can you merge master just to keep this from drifting

@pep8speaks
Copy link

pep8speaks commented Sep 23, 2020

Hello @sbrugman! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-09-23 21:22:44 UTC

@@ -196,7 +196,7 @@ def _validate(self):
@classmethod
def _from_sequence(cls, scalars, dtype=None, copy=False):
if dtype:
assert dtype == "string"
assert isinstance(dtype, StringDtype)
Copy link
Member

Choose a reason for hiding this comment

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

im not sure this is right. cc @TomAugspurger ?

Copy link
Contributor

Choose a reason for hiding this comment

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

They're equivalent right now, but that may be changing in the future with an arrow-backed string array.

But my main objection to this was the original motivation from the issue not being a supported use case.

Copy link
Member

Choose a reason for hiding this comment

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

@TomAugspurger if you dont think this should be supported, should this PR be closed?

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2020

This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Dec 3, 2020
@sbrugman sbrugman closed this Dec 3, 2020
@sbrugman sbrugman deleted the patch-1 branch December 3, 2020 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Stale Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: StringArray non-extensible due to inconsisent assertion
6 participants