-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Categorical.take with fill_value #23296
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
Labels
Categorical
Categorical Data Type
Indexing
Related to indexing on series/frames, not to indexes themselves
Milestone
Comments
This was referenced Oct 23, 2018
API discussion, which we've maybe had before, should we all In [2]: cat = pd.Categorical(['a', 'a', 'b'])
In [3]: cat.take([0, -1, -1], fill_value='d', allow_fill=True)
Out[3]:
[a, d, d]
Categories (3, object): [a, b, d] or should it raise an error? Right now, I think we should allow it, but I could see either way. |
I would think that |
TomAugspurger
added a commit
to TomAugspurger/pandas
that referenced
this issue
Oct 23, 2018
TomAugspurger
added a commit
that referenced
this issue
Oct 23, 2018
* BUG: Handle fill_value in Categorical.take Closes #23296 * no new categories * revert add_categories
tm9k1
pushed a commit
to tm9k1/pandas
that referenced
this issue
Nov 19, 2018
* BUG: Handle fill_value in Categorical.take Closes pandas-dev#23296 * no new categories * revert add_categories
Pingviinituutti
pushed a commit
to Pingviinituutti/pandas
that referenced
this issue
Feb 28, 2019
* BUG: Handle fill_value in Categorical.take Closes pandas-dev#23296 * no new categories * revert add_categories
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Categorical
Categorical Data Type
Indexing
Related to indexing on series/frames, not to indexes themselves
We need to translate the user-provided
fill_value
to thecode
for that category before taking.The text was updated successfully, but these errors were encountered: