Skip to content

ENH: Implement use_nullable_dtypes properly for read_json #50801

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

Open
phofl opened this issue Jan 17, 2023 · 4 comments
Open

ENH: Implement use_nullable_dtypes properly for read_json #50801

phofl opened this issue Jan 17, 2023 · 4 comments
Labels
Arrow pyarrow functionality Enhancement IO JSON read_json, to_json, json_normalize NA - MaskedArrays Related to pd.NA and nullable extension arrays

Comments

@phofl
Copy link
Member

phofl commented Jan 17, 2023

The option was added in #50750 to be ready for 2.0. We should do the dtype inference before actually creating the DataFrame/Series, this should improve performance

@phofl phofl added Enhancement IO JSON read_json, to_json, json_normalize Arrow pyarrow functionality NA - MaskedArrays Related to pd.NA and nullable extension arrays labels Jan 17, 2023
@kostyafarber
Copy link
Contributor

Would be interesting in working on this. What would be a good start?

@phofl
Copy link
Member Author

phofl commented Feb 1, 2023

The main idea is the following: We create numpy-arrays before converting them to a DataFrame. Right now we are converting to extension arrays after creating the DataFrame. Ideally, we want to convert to Extension Arrays before even creating the DataFrame

@kostyafarber
Copy link
Contributor

Will this need tests? or are the tests you did in #50750 enough?

@phofl
Copy link
Member Author

phofl commented Feb 7, 2023

Probably enough except if you discover things that are not covered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Enhancement IO JSON read_json, to_json, json_normalize NA - MaskedArrays Related to pd.NA and nullable extension arrays
Projects
None yet
Development

No branches or pull requests

2 participants