-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: replace na_rep for pd.NA values in to_string
#54959
Closed
Closed
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3cc2518
replace na_rep for pd.NA values
rsm-23 ea1c723
Merge branch 'main' of https://github.com/pandas-dev/pandas into na_r…
rsm-23 af532ba
Merge branch 'main' into na_rep-bug
rsm-23 4073623
Merge remote-tracking branch 'upstream/main' into na_rep-bug
rsm-23 1ef99eb
Merge remote-tracking branch 'upstream/main' into na_rep-bug
rsm-23 4b7dd63
Fixed unit tests for na_rep
rsm-23 17bed8a
fixed docstrings
rsm-23 c28ab1a
Merge branch 'main' into na_rep-bug
rsm-23 2dc5535
Merge branch 'main' into na_rep-bug
rsm-23 f2a42a7
Merge branch 'main' into na_rep-bug
rsm-23 21edb19
Merge branch 'main' into na_rep-bug
rsm-23 875f714
Merge branch 'main' into na_rep-bug
rsm-23 fb356b9
Merge branch 'main' into na_rep-bug
rsm-23 2304fb7
Merge branch 'main' into na_rep-bug
rsm-23 44ba528
Merge branch 'main' into na_rep-bug
rsm-23 4213cd8
reverted tests and updated default value
rsm-23 6e2028c
removed print
rsm-23 7087110
reverted tests and changed default value for na_rep
rsm-23 7aad289
Merge remote-tracking branch 'upstream/main' into na_rep-bug
rsm-23 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 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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.
All the usages that were changed should still use
<NA>
rather thanNaN
. This should only change ifna_rep
was specified as something elseThere 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.
@mroeschke
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 think since the current behavior has been the case for a few releases now, the default of
na_rep="NaN"
should be changed tona_rep=lib.no_default
so thatNaN
,NA
, andNone
can continue to use their reprs hereThere 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.
@mroeschke the problem is if I set
na_rep=lib.no_default
then the string representation will not contain either ofNaN
,NA
orNone
. I have tried setting the default as<NA>
and reverted most of the test cases, however, there's issue in a couple of them.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.
Using
na_rep=lib.no_default
would mean makingNaN
,NA
andNone
return their string defaults like