-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Timedelta to_json with date_format='iso' #15137
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
yes this is probably unsupported you can pass a default_handler to deal with it, though prob better do it in the c-code. |
I'm gonna attempt to do it in |
yeah looks like its the |
@TomAugspurger any progress with this? |
@ron819 why don’t you do a pull request for this? we have thousands of issues and very few core devs, who mostly do code review |
Looks like this is solved on master by by: #30903 |
Is this formatting for timdelta columns intended / correct?
So a
pd.Timedelta('1D')
goes to"1970-01-02T00:00:00.000Z"
.The expected might be a duration like
"P1DT0H0M0S"
.It seems to be reusing the logic for datetime columns and treating it as the equivalent int -> iso format. Ideally
to_json
will have a new paramatertimedelta_format
that takes the same values asdate_format
.The text was updated successfully, but these errors were encountered: