-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
TST: add fillna test for filling with Categorical #62319
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
Conversation
rhshadrach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
| ) | ||
|
|
||
| filler = Series(Categorical([10.0, 20.0, 30.0])) | ||
| df.fillna({"ints": filler}, inplace=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you avoid mutating here; when debugging, it can be helpful to have both before and after the operation accessible.
| df.fillna({"ints": filler}, inplace=True) | |
| result = df.fillna({"ints": filler}) |
| tm.assert_frame_equal(df.fillna(value=NaT), df) | ||
|
|
||
| def test_fillna_with_categorical_series(self): | ||
| df = DataFrame( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a reference to the issue as a comment on the first line.
# https://github.com/pandas-dev/pandas/issues/56329
|
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
|
Closing as stale. If you're interested in continuing, address requests above and we'd be more than happy to reopen! |
Added a test to TestFillNA to check that call fillna with a
Seriesof dtypeCategoricaldoes not throw an error.