-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
EA: fillna should accept same type #32414 #43230
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c46b201
TST Providing unit test to snippet GH32414
Bhavay-2001 02db9f0
TST Providing unit test to snippet GH#32414
Bhavay-2001 b872815
Updated the test_fillna file based on GH43230
Bhavay-2001 49b693c
Updated with required changes
Bhavay-2001 edf6af7
Updated the changes
Bhavay-2001 12ab6aa
test_fillna.py updated
Bhavay-2001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This does not cover the issue. We need to check with a categorical fill_value too.
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.
I have defined the the fill_value in the pytest parameterized section. There I have provided a fill_value . Do we need to explicitly define that categroical value here??
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.
Could you please ellaborate on this a little more ?? I find it difficult to understand
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.
You are not testing everything mentioned in the issue. @mroeschke provided a code snippet there which should be covered here
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.
In [22]: cat = pd.Categorical(["A", "B", None, "A"])
...: ser = pd.Series(cat).fillna("B")
In [23]: >>> filled = cat.fillna(ser)
In [24]: >>> cat.fillna(filled)
Out[24]:
['A', 'B', 'B', 'A']
Categories (2, object): ['A', 'B']
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.
hey @phofl, this was the code snippet as being provided by @mroeschke, I have tried to add the same thing. Soo i'm asking should I add "B" instead of that fill_value??
I saw other tests too and they did the same thing, do you want me to explicitly declare "B"
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.
okay @phofl , I have checked with categorical_fillna too. I will add the updated code tomorrow positively. I think with that issue will be resolved. Thanks