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

ENH: Add support for date_unit to be specified per column in to_json #39135

Open
galipremsagar opened this issue Jan 12, 2021 · 2 comments
Open
Labels
Enhancement IO JSON read_json, to_json, json_normalize

Comments

@galipremsagar
Copy link

galipremsagar commented Jan 12, 2021

Is your feature request related to a problem?

I would want to encode my dataframe consisting of datetime64 & timedelta64 columns with different units of precision per column in to_json.

Describe the solution you'd like

Currently in to_json, the date_unit param achieves this for the entire dataframe, but I would like to encode each column with different precision. Hence a dict-like support for date_unit would be good to have.

Describe alternatives you've considered

None

@galipremsagar galipremsagar added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 12, 2021
@rhshadrach
Copy link
Member

Is this for read_json?

@galipremsagar galipremsagar changed the title ENH: Add support for date_unit to be specified per column ENH: Add support for date_unit to be specified per column in to_json Jan 15, 2021
@galipremsagar
Copy link
Author

@rhshadrach This is in to_json, but yes change in to_json would also need changes in reader too.

@simonjayhawkins simonjayhawkins added IO JSON read_json, to_json, json_normalize and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 19, 2021
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

3 participants