-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
BUG: Fix inconsistency of converting empty categorical with dtype_backend='pyarrow' #61131
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
Changes from 7 commits
9d415ea
e7c4911
02218af
6773281
2ca6467
33cd18b
109cbab
0b29d82
7c00c66
90d6251
9769544
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1143,6 +1143,7 @@ def convert_dtypes( | |
base_dtype.kind == "O" # type: ignore[union-attr] | ||
and input_array.size > 0 | ||
and isna(input_array).all() | ||
and not isinstance(input_array.dtype, CategoricalDtype) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Could you put this check above the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, could you properly add an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this to the outer if branch, to skip the arrow dtype conversion for CategoricalDtype. As mentioned in #59934, the expected behavior of |
||
): | ||
import pyarrow as pa | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.