Skip to content

ENH: Add global option io.nullable_type="pandas"|"pyarrow" to control IO reader use_nullable_dtype #48957

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

Closed
mroeschke opened this issue Oct 5, 2022 · 1 comment
Labels
Arrow pyarrow functionality Enhancement IO Data IO issues that don't fit into a more specific label NA - MaskedArrays Related to pd.NA and nullable extension arrays

Comments

@mroeschke
Copy link
Member

xref: #29752, #36712

From the above issues and read_parquet, it appears that generally a use_nullable_dtypes: bool option will be added to read_* functions to allow users to opt into pandas nullable types.

Additionally in 1.5 with ArrowDtype, the nullable type returned could be backed by pyarrow instead of pandas' implementation. This could be advantageous for read_*(engine="pyarrow") capable readers where an option like io.nullable_type="pyarrow" would just preserve the pyarrow object from the pyarrow parsing function instead of converting it to a numpy object.

The proposal would be to add a new global option io.nullable_type="pandas"|"pyarrow" (default="pandas") such that when pd.read_*(..., use_nullable_dtype=True), the nullable backing type would be dictated by the global io.nullable_type setting.

@mroeschke
Copy link
Member Author

I think this is largely done. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Enhancement IO Data IO issues that don't fit into a more specific label NA - MaskedArrays Related to pd.NA and nullable extension arrays
Projects
None yet
Development

No branches or pull requests

2 participants