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

BUG: Categorical constructor scalar categories #16340

Merged
merged 2 commits into from
May 16, 2017

Conversation

TomAugspurger
Copy link
Contributor

Categorical constructor no longer accepts scalars for categories.

Closes #16022

@TomAugspurger TomAugspurger added the Categorical Categorical Data Type label May 12, 2017
@TomAugspurger TomAugspurger added this to the 0.21.0 milestone May 12, 2017
@jreback
Copy link
Contributor

jreback commented May 12, 2017

lgtm.

@codecov
Copy link

codecov bot commented May 12, 2017

Codecov Report

Merging #16340 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16340      +/-   ##
==========================================
- Coverage   90.38%   90.36%   -0.03%     
==========================================
  Files         161      161              
  Lines       50916    50918       +2     
==========================================
- Hits        46020    46011       -9     
- Misses       4896     4907      +11
Flag Coverage Δ
#multiple 88.13% <100%> (-0.01%) ⬇️
#single 40.22% <50%> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/core/categorical.py 95.87% <100%> (+0.01%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/util/testing.py 80.56% <0%> (-0.2%) ⬇️
pandas/core/frame.py 97.68% <0%> (-0.1%) ⬇️

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 4cd8458...91bb0fd. Read the comment docs.

@codecov
Copy link

codecov bot commented May 12, 2017

Codecov Report

Merging #16340 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16340      +/-   ##
==========================================
- Coverage    90.4%   90.36%   -0.05%     
==========================================
  Files         161      161              
  Lines       50933    50935       +2     
==========================================
- Hits        46048    46027      -21     
- Misses       4885     4908      +23
Flag Coverage Δ
#multiple 88.13% <100%> (-0.03%) ⬇️
#single 40.21% <50%> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/core/categorical.py 95.87% <100%> (+0.01%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_converter.py 63.23% <0%> (-1.82%) ⬇️
pandas/util/testing.py 80.56% <0%> (-0.2%) ⬇️
pandas/core/frame.py 97.68% <0%> (-0.1%) ⬇️

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 42e2a87...d898b8b. Read the comment docs.

Categorical
^^^^^^^^^^^

- The Categorical constructor no longer accepts a scalar for the ``categories`` keyword (:issue:`16022`)
Copy link
Member

Choose a reason for hiding this comment

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

put it in api changes section ?

@TomAugspurger TomAugspurger merged commit 9d3bef8 into pandas-dev:master May 16, 2017
pawroman added a commit to pawroman/pandas that referenced this pull request May 18, 2017
* upstream/master: (48 commits)
  BUG: Categorical comparison with unordered (pandas-dev#16339)
  ENH: Adding 'protocol' parameter to 'to_pickle'.
  PERF: improve MultiIndex get_loc performance (pandas-dev#16346)
  TST: remove pandas-datareader xfail as 0.4.0 works (pandas-dev#16374)
  TST: followup to pandas-dev#16364, catch errstate warnings (pandas-dev#16373)
  DOC: new oauth token
  TST: Add test for clip-na (pandas-dev#16369)
  ENH: Draft metadata specification doc for Apache Parquet (pandas-dev#16315)
  MAINT: Add .iml to .gitignore (pandas-dev#16368)
  BUG/API: Categorical constructor scalar categories (pandas-dev#16340)
  ENH: Provide dict object for to_dict() pandas-dev#16122 (pandas-dev#16220)
  PERF: improved clip performance (pandas-dev#16364)
  DOC: try new token for docs
  DOC: try with new secure token
  DOC: add developer section to the docs
  DEPS: Drop Python 3.4 support (pandas-dev#16303)
  DOC: remove credential helper
  DOC: force fetch on build docs
  DOC: redo dev docs access token
  DOC: add dataframe construction in merge_asof example (pandas-dev#16348)
  ...
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
* BUG: Categorical constructor scalar categories

Categorical constructor no longer accepts scalars for categories.

Closes pandas-dev#16022
@TomAugspurger TomAugspurger deleted the categorical-scalar branch May 27, 2017 16:36
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
* BUG: Categorical constructor scalar categories

Categorical constructor no longer accepts scalars for categories.

Closes pandas-dev#16022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants