Skip to content

Commit 151316d

Browse files
update import and test
1 parent 961eb6c commit 151316d

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

pandas/core/strings/accessor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
is_list_like,
3232
is_object_dtype,
3333
is_re,
34+
is_string_dtype,
3435
)
3536
from pandas.core.dtypes.dtypes import (
3637
ArrowDtype,
@@ -2522,8 +2523,6 @@ def get_dummies(
25222523
1 False False False
25232524
2 True False True
25242525
"""
2525-
from pandas.core.dtypes.common import is_string_dtype
2526-
25272526
from pandas.core.frame import DataFrame
25282527

25292528
if is_string_dtype(dtype):

pandas/tests/strings/test_get_dummies.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,3 @@ def test_get_dummies_with_str_dtype(any_string_dtype):
9797
ValueError, match="string dtype not supported, please use a numeric dtype"
9898
):
9999
s.str.get_dummies("|", dtype=str)
100-
101-
102-
# GH#47872
103-
@td.skip_if_no("pyarrow")
104-
def test_get_dummies_with_pa_str_dtype(any_string_dtype):
105-
s = Series(["a|b", "a|c", np.nan], dtype=any_string_dtype)
106-
with pytest.raises(
107-
ValueError, match="string dtype not supported, please use a numeric dtype"
108-
):
109-
s.str.get_dummies("|", dtype="str[pyarrow]")

0 commit comments

Comments
 (0)