8000 Convert to compatible NumPy dtype for MaskedArray to_numpy by phofl · Pull Request #55058 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Convert to compatible NumPy dtype for MaskedArray to_numpy #55058

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 18 commits into from
Dec 1, 2023
Merged
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
phofl committed Nov 17, 2023
commit cb7ca91462c793ee7dd7869cdeeaf7d00fc6da80
1 change: 1 addition & 0 deletions pandas/io/parsers/base_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ def _infer_types(
result = ArrowExtensionArray(pa.array(result, from_pandas=True))
elif isinstance(result, BaseMaskedArray):
if result._mask.all():
# We want an arrow null array here
result = result.to_numpy(na_value=None)
result = ArrowExtensionArray(pa.array(result))
else:
Expand Down
0