-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
Conversation
@dsaxton Thanks for your review. I've processed your proposed changes and added an additional string dtype test. |
There was a problem hiding this 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
Done |
I think the issue has an ongoing discussion that needs to be resolved. |
@sbrugman can you merge master just to keep this from drifting |
@@ -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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
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. |
Fix for #34309
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff