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
Better display of negative Timedelta #17232
Comments
xref #15633 We're following python's (confusing) lead here, but I suppose we could break on the repr.
|
I suppose, though not really sure its worth the inconsistency here. |
I would say it is really worth it, as the current representation for negative number is really really confusing. But about breaking consistency, I guess the string representation for negative timedeltas was not meant to have any kind of usability in mind. I found the following discussion (basically all I could found about it): https://lists.gt.net/python/dev/1129944
I guess it would be better to have python's default implementation of the string changed (instead of doing it in an ad-hoc fashion for every different project, including pandas), but as this won't be the case, I believe it is a good idea to add to pandas, because the way it is is very non intuitive. |
Code Sample, a copy-pastable example if possible
Problem description
Timedelta('-1 days +23:59:59.877000')
is not a very clear display of a negativeTimedelta
It could be better (for many usages) to display negative
Timedelta
likeTimedelta('0 days -00:00:00.123000')
orTimedelta('-0 days 00:00:00.123000')
The text was updated successfully, but these errors were encountered: