Skip to content

Commit 27ce828

Browse files
committed
Added test case to check extension arrays dtype
1 parent 09e8472 commit 27ce828

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/groupby/test_grouping.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ def test_groupby_categorical_index_and_columns(self, observed):
282282
expected = DataFrame(data=expected_data.T, index=expected_columns)
283283
assert_frame_equal(result, expected)
284284

285+
def test_groupby_extension_array(self):
286+
df = pd.DataFrame({'Int': pd.Series([1, 2, 3], dtype='Int64'),
287+
'A': [1, 2, 1]})
288+
result = df.groupby('A').Int.sum()
289+
assert result is not None
290+
assert result.dtype.name == 'Int64'
291+
285292
def test_grouper_getting_correct_binner(self):
286293

287294
# GH 10063

0 commit comments

Comments
 (0)