You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix Index.to_pandas string/object handling to use pandas "str" dtype when appropriate #5353
This ticket tracks a change to Index.to_pandas that improves compatibility with pandas expectations for string-like indexes, particularly around missing values.
Previously, Index.to_pandas always constructed a pd.Index using the NumPy dtype inferred from the underlying array. For object, unicode, or bytes dtypes (dtype.kind in {"O", "U", "S"}), this could result in a pandas Index that does not match pandas’ "string" semantics, especially with respect to NA handling.
The new logic detects when the converted NumPy array:
Has an object / unicode / bytes dtype, and
Is empty or
Contains only str values or None
In those cases, Index.to_pandas now constructs the result via:
Activity
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes Bears-R-Us#5353: Fix Index.to_pandas string/object handling to…
Closes #5353: Fix Index.to_pandas string/object handling to use panda…