Skip to content

Commit 5b74f2c

Browse files
jorisvandenbosscheproost
authored andcommitted
TST: add test for Series.item backed with ExtensionArray (pandas-dev#30318)
1 parent b681e7f commit 5b74f2c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/extension/base/getitem.py

+6
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,9 @@ def test_loc_len1(self, data):
266266
df = pd.DataFrame({"A": data})
267267
res = df.loc[[0], "A"]
268268
assert res._data._block.ndim == 1
269+
270+
def test_item(self, data):
271+
# https://github.com/pandas-dev/pandas/pull/30175
272+
s = pd.Series(data)
273+
result = s[:1].item()
274+
assert result == data[0]

0 commit comments

Comments
 (0)