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

Adjust tests in array folder for new string option #56188

Merged
merged 11 commits into from
Dec 9, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 26, 2023

sits on top of #56187

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Strings String extension data type and string data Arrow pyarrow functionality labels Nov 27, 2023
@phofl
Copy link
Member Author

phofl commented Dec 8, 2023

cc @mroeschke gentle ping

@@ -929,10 +931,13 @@ def value_counts_internal(

# For backwards compatibility, we let Index do its normal type
# inference, _except_ for if if infers from object to bool.
idx = Index(keys)
idx = Index(keys, dtype=input_dtype if input_dtype != "float16" else None)
Copy link
Member

Choose a reason for hiding this comment

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

Should these changes not be here after your comments in #56187?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh very good point, forgot the revert. thx. does

@@ -932,7 +932,10 @@ def value_counts_internal(
idx = Index(keys)
if idx.dtype == bool and keys.dtype == object:
idx = idx.astype(object)
elif idx.dtype != keys.dtype:
elif (
idx.dtype != keys.dtype # noqa: PLR1714 # # pylint: disable=R1714
Copy link
Member

Choose a reason for hiding this comment

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

Just confirming this change isn't related to your referenced, closed PR right?

Copy link
Member Author

Choose a reason for hiding this comment

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

No this is fine, this is the infer_string inference, which will still happen

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

Thanks @phofl

@phofl phofl deleted the array_tests branch December 9, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Strings String extension data type and string data Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants