-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: align timedelta fractional seconds #57188
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
Comments
Thanks for the report - agreed this would be an improvement. PRs to fix are welcome. |
Working on one :) but this functionality is buried in some Cython code ( |
still working on this @wjandrea ? |
Hi @wjandrea , just a friendly follow-up on my previous comment. Since I haven't heard back, I wanted to let you know that I'm planning to start working on this soon. Your input would be valuable before I begin. Thanks! |
take |
take |
@mafaldam Yeah, I actually made quite a bit of progress on this, but it's setting up the build system that I'm stuck on right now. Let me plug away at it a little while and I'll let you know. Sorry for not replying sooner :) |
Co-authored by: Sofia Simas <[email protected]>
Co-authored by: Sofia Simas <[email protected]>
Co-authored by: Sofia Simas <[email protected]>
Feature Type
Problem Description
It's hard to read a column of timedeltas with fractional seconds of different precisions because it's not aligned, for example:
It'd be easier to read like this:
or
To reproduce:
Feature Description
Add padding on the right.
In this case, it can be done by left-justifying to the largest size:
But of course, this wouldn't work for different numbers of days. For example:
If timedeltas had a
.replace()
method so you could zero out the days, then it would work, but AFAIK such a method doesn't exist.BTW, the same thing is already implemented for floats and datetimes.
Alternative Solutions
n/a
Additional Context
No response
The text was updated successfully, but these errors were encountered: