Skip to content

CLN: minor cleaning of Categorical.__init__ #24402

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 2 commits into from
Dec 24, 2018

Conversation

topper-123
Copy link
Contributor

At a certain point in the Categorical init, we should for clarity only use dtype and not intermix categories or ordered.

This small PR does that.

@codecov
Copy link

codecov bot commented Dec 23, 2018

Codecov Report

Merging #24402 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24402      +/-   ##
==========================================
- Coverage    92.3%    92.3%   -0.01%     
==========================================
  Files         162      162              
  Lines       51875    51871       -4     
==========================================
- Hits        47883    47879       -4     
  Misses       3992     3992
Flag Coverage Δ
#multiple 90.71% <100%> (-0.01%) ⬇️
#single 42.99% <66.66%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/categorical.py 95.29% <100%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e0358d...be3832d. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 23, 2018

Codecov Report

Merging #24402 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24402      +/-   ##
==========================================
- Coverage    92.3%    92.3%   -0.01%     
==========================================
  Files         162      163       +1     
  Lines       51875    51944      +69     
==========================================
+ Hits        47883    47946      +63     
- Misses       3992     3998       +6
Flag Coverage Δ
#multiple 90.71% <100%> (ø) ⬆️
#single 42.99% <100%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/categorical.py 95.3% <100%> (-0.02%) ⬇️
pandas/core/arrays/datetimes.py 97.77% <0%> (-0.47%) ⬇️
pandas/core/arrays/timedeltas.py 86.85% <0%> (-0.31%) ⬇️
pandas/core/arrays/datetimelike.py 96.35% <0%> (-0.16%) ⬇️
pandas/core/indexes/timedeltas.py 90.42% <0%> (-0.03%) ⬇️
pandas/core/arrays/period.py 98.49% <0%> (-0.01%) ⬇️
pandas/core/indexes/datetimes.py 96.33% <0%> (-0.01%) ⬇️
pandas/core/indexes/base.py 96.27% <0%> (ø) ⬆️
pandas/core/arrays/_ranges.py 98.66% <0%> (ø)
pandas/core/indexes/datetimelike.py 97.29% <0%> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e0358d...f8034cf. Read the comment docs.

@jreback jreback added Categorical Categorical Data Type Clean labels Dec 23, 2018
@jreback jreback added this to the 0.24.0 milestone Dec 23, 2018
@jreback
Copy link
Contributor

jreback commented Dec 23, 2018

lgtm. can you run the asv's for categoricals to make sure nothing has changed; we recently had some optimization here which depended on certain checks.

Copy link
Member

@jschendel jschendel left a comment

Choose a reason for hiding this comment

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

lgtm pending @jreback's asv comment

@topper-123
Copy link
Contributor Author

I have some problem getting asv working. I don’t think this can have a performance effect now, after the change after @jschendel comments...

@jreback jreback merged commit 9f62f5e into pandas-dev:master Dec 24, 2018
@jreback
Copy link
Contributor

jreback commented Dec 24, 2018

thanks @topper-123

@topper-123 topper-123 deleted the clean_Categorical.__init__ branch December 24, 2018 23:14
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Clean
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants