Skip to content

DOC: clarify default behavior for categories ordering #22081

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
Aug 1, 2018

Conversation

toobaz
Copy link
Member

@toobaz toobaz commented Jul 27, 2018

  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

Just a doc clarification on default categories ordering, which can be pretty confusing when handling mixed dtypes (see also #22080 ).

@codecov
Copy link

codecov bot commented Jul 27, 2018

Codecov Report

Merging #22081 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22081   +/-   ##
=======================================
  Coverage   92.07%   92.07%           
=======================================
  Files         170      170           
  Lines       50688    50688           
=======================================
  Hits        46671    46671           
  Misses       4017     4017
Flag Coverage Δ
#multiple 90.48% <ø> (ø) ⬆️
#single 42.31% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/categorical.py 95.95% <ø> (ø) ⬆️

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 26b3e7d...ddb03e4. Read the comment docs.

@jreback jreback added Docs MultiIndex Categorical Categorical Data Type labels Jul 28, 2018
@jreback jreback added this to the 0.24.0 milestone Jul 28, 2018
@jreback
Copy link
Contributor

jreback commented Jul 28, 2018

lgtm. @TomAugspurger @jorisvandenbossche wording look ok?

@@ -241,10 +241,14 @@ class Categorical(ExtensionArray, PandasObject):
categories will be replaced with NaN.
categories : Index-like (unique), optional
The unique categories for this categorical. If not given, the
categories are assumed to be the unique values of values.
categories are assumed to be the unique values of values (sorted, if
Copy link
Contributor

Choose a reason for hiding this comment

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

The second values should be in backticks.

@toobaz toobaz force-pushed the categorical_ordered_doc branch from ea68572 to ddb03e4 Compare July 30, 2018 12:05
@toobaz toobaz merged commit 9c11866 into pandas-dev:master Aug 1, 2018
@toobaz toobaz deleted the categorical_ordered_doc branch August 1, 2018 14:43
dberenbaum pushed a commit to dberenbaum/pandas that referenced this pull request Aug 3, 2018
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants