Skip to content
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

Request to add more date formats in to_json method #22317

Open
chankeypathak opened this issue Aug 13, 2018 · 4 comments
Open

Request to add more date formats in to_json method #22317

chankeypathak opened this issue Aug 13, 2018 · 4 comments
Labels
Enhancement IO JSON read_json, to_json, json_normalize

Comments

@chankeypathak
Copy link
Contributor

chankeypathak commented Aug 13, 2018

Problem description

to_json method provides date in either epoch or iso format. Would be nice if we can support more date formats like UTC, GMT etc.

@gfyoung gfyoung added Enhancement IO JSON read_json, to_json, json_normalize labels Aug 15, 2018
@gfyoung
Copy link
Member

gfyoung commented Aug 15, 2018

@chankeypathak : Thanks for the report! If it's not to difficult to do, I wouldn't be opposed. My only concern is the maintenance costs vs. the actual benefit for our end users as a whole.

cc @jreback

@austinlostinboston
Copy link

austinlostinboston commented Mar 5, 2019

@gfyoung agreed about maintenance. What if date_format took a strf string so the user could create their own output format? My big complaint here is that iso add's a Z to the end of the timestamp, locking the time into UTC moving forward. Of course if can be stripped out, but that comes off both dirty and unnecessary. Thoughts?

@jreback
Copy link
Contributor

jreback commented Mar 5, 2019

JSON is somewhat standardized in dates with iso and epoch so this is leading to even more confusion

-1 on expanding this
if you want to have a column of specialized dates then just create a string column

@pablodz
Copy link

pablodz commented May 25, 2021

Well, exceptions are not the rule, as gfyoung says, this makes pandas's library more difficult to maintain in long term and the costs related vs the benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

No branches or pull requests

5 participants