We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd5c2ab commit 822b3f4Copy full SHA for 822b3f4
pandas/core/strings/accessor.py
@@ -2487,13 +2487,7 @@ def get_dummies(
2487
# we need to cast to Series of strings as only that has all
2488
# methods available for making the dummies...
2489
result, name = self._data.array._str_get_dummies(sep, dtype)
2490
- if is_extension_array_dtype(dtype):
2491
- return self._wrap_result(
2492
- DataFrame(result, columns=name, dtype=dtype),
2493
- name=name,
2494
- returns_string=False,
2495
- )
2496
- if isinstance(dtype, ArrowDtype):
+ if is_extension_array_dtype(dtype) or isinstance(dtype, ArrowDtype):
2497
return self._wrap_result(
2498
DataFrame(result, columns=name, dtype=dtype),
2499
name=name,
0 commit comments