Skip to content

Commit 7c19e27

Browse files
keep using mode.string_storage as default for NA variant + more xfails
1 parent 6c0d228 commit 7c19e27

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pandas/core/arrays/string_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def __init__(
129129
) -> None:
130130
# infer defaults
131131
if storage is None:
132-
if using_string_dtype():
132+
if using_string_dtype() and na_value is not libmissing.NA:
133133
storage = "pyarrow"
134134
else:
135135
storage = get_option("mode.string_storage")

pandas/tests/io/parser/test_index_col.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import numpy as np
1010
import pytest
1111

12+
from pandas._config import using_string_dtype
13+
1214
from pandas import (
1315
DataFrame,
1416
Index,
@@ -343,6 +345,7 @@ def test_infer_types_boolean_sum(all_parsers):
343345
tm.assert_frame_equal(result, expected, check_index_type=False)
344346

345347

348+
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
346349
@pytest.mark.parametrize("dtype, val", [(object, "01"), ("int64", 1)])
347350
def test_specify_dtype_for_index_col(all_parsers, dtype, val, request):
348351
# GH#9435

0 commit comments

Comments
 (0)