Skip to content

Commit a4b2c3a

Browse files
lukemanleyphofl
authored andcommitted
BUG: Series.any and Series.all for empty or all-null pyarrow-backed dtypes (pandas-dev#51631)
* BUG: ArrowExtensionArray boolean reductions for empty or all null array * whatsnew * clarify whatsnew
1 parent 2f43b41 commit a4b2c3a

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

pandas/tests/extension/test_arrow.py

-26
Original file line numberDiff line numberDiff line change
@@ -2325,29 +2325,3 @@ def test_boolean_reduce_series_all_null(all_boolean_reductions, skipna):
23252325
else:
23262326
expected = pd.NA
23272327
assert result is expected
2328-
2329-
2330-
def test_from_sequence_of_strings_boolean():
2331-
true_strings = ["true", "TRUE", "True", "1", "1.0"]
2332-
false_strings = ["false", "FALSE", "False", "0", "0.0"]
2333-
nulls = [None]
2334-
strings = true_strings + false_strings + nulls
2335-
bools = (
2336-
[True] * len(true_strings) + [False] * len(false_strings) + [None] * len(nulls)
2337-
)
2338-
2339-
result = ArrowExtensionArray._from_sequence_of_strings(strings, dtype=pa.bool_())
2340-
expected = pd.array(bools, dtype="boolean[pyarrow]")
2341-
tm.assert_extension_array_equal(result, expected)
2342-
2343-
strings = ["True", "foo"]
2344-
with pytest.raises(pa.ArrowInvalid, match="Failed to parse"):
2345-
ArrowExtensionArray._from_sequence_of_strings(strings, dtype=pa.bool_())
2346-
2347-
2348-
def test_concat_empty_arrow_backed_series(dtype):
2349-
# GH#51734
2350-
ser = pd.Series([], dtype=dtype)
2351-
expected = ser.copy()
2352-
result = pd.concat([ser[np.array([], dtype=np.bool_)]])
2353-
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)