Skip to content

Commit fabfc8a

Browse files
committed
add test for grouped column
1 parent d60f020 commit fabfc8a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/dt/test-nth.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ def test_nth_grouped():
143143
})
144144
assert_equals(DT_nth, DT_ref)
145145

146+
147+
def test_nth_grouped_by():
148+
"""Test nth when called on the `by` column"""
149+
DT = dt.Frame([0, 1, 0])
150+
DT_nth = DT[:, dt.nth(f.C0, 0), by(f.C0)]
151+
DT_ref = dt.Frame({'C0':[0,1], 'C1':[0,1]})
152+
146153
@pytest.mark.xfail(reason='skipna not implemented yet')
147154
def test_nth_grouped_skipna():
148155
DT = dt.Frame([[15, None, 136, 93, 743, None, None, 91],

0 commit comments

Comments
 (0)