Skip to content

CLN: Assorted cleanups #28563

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 8 commits into from
Sep 23, 2019
Merged

CLN: Assorted cleanups #28563

merged 8 commits into from
Sep 23, 2019

Conversation

jbrockmendel
Copy link
Member

No description provided.

@gfyoung gfyoung added Clean Internals Related to non-user accessible pandas implementation labels Sep 22, 2019
@@ -743,7 +742,7 @@ def value_counts(

else:

if is_extension_array_dtype(values) or is_sparse(values):
if is_extension_array_dtype(values):
Copy link
Member

Choose a reason for hiding this comment

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

For everyone's edification: why can we remove this check?

Copy link
Member Author

Choose a reason for hiding this comment

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

is_sparse is a subset of is_extension_array_dtype

subarr = dtype.construct_array_type()(
arr, dtype.categories, ordered=dtype._ordered
)
elif is_extension_array_dtype(dtype):
# create an extension array from its dtype
dtype = cast(ExtensionDtype, dtype)
Copy link
Member

Choose a reason for hiding this comment

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

For everyone's edification: why are we doing this? Same for the similar cast a few lines above.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is to keep mypy from complaining

@jreback jreback added this to the 1.0 milestone Sep 23, 2019
@jreback jreback merged commit e448a26 into pandas-dev:master Sep 23, 2019
@jreback
Copy link
Contributor

jreback commented Sep 23, 2019

thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the faster20 branch September 23, 2019 12:44
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
bongolegend pushed a commit to bongolegend/pandas that referenced this pull request Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants