-
-
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
DEPR: Index.format #55439
DEPR: Index.format #55439
Conversation
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.
lgtm in my files of interest
@@ -1383,6 +1391,31 @@ def format( | |||
|
|||
return self._format_with_header(header=header, na_rep=na_rep) | |||
|
|||
_default_na_rep = "NaN" |
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.
Is this correct if the data is a masked array with NA?
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.
ATM Index.format and DTI.format have different defaults for na_rep. Putting this here keeps the same behavior for _format_flat while avoiding the need for overrding the whole method in DTI.
Looks like na_rep is ignored inside format_with_header anyway
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.
Looks like na_rep is ignored inside format_with_header anyway
That's probably not good, but I guess that can be tackled elsewhere
Thanks @jbrockmendel |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.