Skip to content

String dtype: fix convert_dtypes() to convert NaN-string to NA-string #59470

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

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
fix CoW tracking for conversion to python storage strings
  • Loading branch information
jorisvandenbossche committed Aug 10, 2024
commit 40185d36c0bddb52af42f71ca186ff2fb8287efb
6 changes: 5 additions & 1 deletion pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,11 @@ def convert(self) -> list[Block]:
convert_non_numeric=True,
)
refs = None
if res_values is values:
if (
res_values is values
or isinstance(res_values, NumpyExtensionArray)
and res_values._ndarray is values
):
refs = self.refs

res_values = ensure_block_shape(res_values, self.ndim)
Expand Down
Loading