Skip to content

Commit a321daf

Browse files
committed
Removed unnecessary change in test_string
1 parent 771a19c commit a321daf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/arrays/string_/test_string.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def test_astype_float(dtype, any_float_dtype):
258258
# Don't compare arrays (37974)
259259
ser = pd.Series(["1.1", pd.NA, "3.3"], dtype=dtype)
260260
result = ser.astype(any_float_dtype)
261-
expected = pd.Series([1.1, np.nan, 3.3], dtype=any_float_dtype)
261+
item = np.nan if isinstance(result.dtype, np.dtype) else pd.NA
262+
expected = pd.Series([1.1, item, 3.3], dtype=any_float_dtype)
262263
tm.assert_series_equal(result, expected)
263264

264265

0 commit comments

Comments
 (0)