Skip to content

DOC: Clarified documentation for convert_dates and use_default_dates params #30949

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

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

amilbourne
Copy link
Contributor

This hopefully clarifies the documentation for the behaviour of the convert_dates and keep_default_dates parameters on the read_json function.

I recently had to use this function and found the existing docs a bit confusing. I actually created a truth table (below), but this is probably a bit much for the docs.

convert_dates keep_default_dates Result
True True Convert default date fields
True False Don’t convert anything
False True Don’t convert anything
False False Don’t convert anything
List True Convert listed and default date fields
List False Convert just listed date fields

I hope you agree that my changes make the behaviour clearer - but perhaps people will disagree...

@simonjayhawkins simonjayhawkins added Docs IO JSON read_json, to_json, json_normalize labels Jan 13, 2020
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment otherwise lgtm

@WillAyd WillAyd added this to the 1.1 milestone Jan 14, 2020
@WillAyd WillAyd merged commit cb05c13 into pandas-dev:master Jan 14, 2020
@WillAyd
Copy link
Member

WillAyd commented Jan 14, 2020

Great thanks @amilbourne

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

Successfully merging this pull request may close these issues.

3 participants