Skip to content

BUG: Categorical.from_codes should not warn on empty codes #29336

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 1 commit into from
Nov 2, 2019

Conversation

topper-123
Copy link
Contributor

Empty codes should not warn about float codes:

>>> pd.Categorical.from_codes([], ['a', 'b', 'c']) 
C:\Users\TP\Miniconda3\envs\pandas-dev\Scripts\ipython:1: FutureWarning: float codes will be disallowed in the future and raise a ValueError

@topper-123 topper-123 added Categorical Categorical Data Type Bug labels Nov 2, 2019
@topper-123 topper-123 added this to the 1.0 milestone Nov 2, 2019
@jreback jreback merged commit dd55e44 into pandas-dev:master Nov 2, 2019
@jreback
Copy link
Contributor

jreback commented Nov 2, 2019

cool thanks

@topper-123 topper-123 deleted the cat_from_codes_empty_codes branch November 2, 2019 16:13
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Categorical Categorical Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants