Skip to content

Commit d02379d

Browse files
Revert "undo inference change"
This reverts commit c095cd4.
1 parent 88b05e8 commit d02379d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/_libs/lib.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ _TYPE_MAP = {
11101110
"complex64": "complex",
11111111
"complex128": "complex",
11121112
"c": "complex",
1113-
"string": "string",
1113+
str: "string",
11141114
"S": "bytes",
11151115
"U": "string",
11161116
"bool": "boolean",

pandas/tests/dtypes/test_inference.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1267,9 +1267,9 @@ def test_interval(self):
12671267
@pytest.mark.parametrize("klass", [pd.array, Series])
12681268
@pytest.mark.parametrize("skipna", [True, False])
12691269
@pytest.mark.parametrize("data", [["a", "b", "c"], ["a", "b", pd.NA]])
1270-
def test_string_dtype(self, data, skipna, klass):
1270+
def test_string_dtype(self, data, skipna, klass, nullable_string_dtype):
12711271
# StringArray
1272-
val = klass(data, dtype="string")
1272+
val = klass(data, dtype=nullable_string_dtype)
12731273
inferred = lib.infer_dtype(val, skipna=skipna)
12741274
assert inferred == "string"
12751275

0 commit comments

Comments
 (0)