Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pandas/tests/groupby/transform/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,20 @@ def test_dispatch_transform(tsframe):
tm.assert_frame_equal(filled, expected)


def test_transform_fillna_null():
df = DataFrame(
dict(
price=[10, 10, 20, 20, 30, 30],
color=[10, 10, 20, 20, 30, 30],
cost=(100, 200, 300, 400, 500, 600),
)
)
with pytest.raises(ValueError, match="Must specify a fill 'value' or 'method'"):
df.groupby(["price"]).transform("fillna")
with pytest.raises(ValueError, match="Must specify a fill 'value' or 'method'"):
df.groupby(["price"]).fillna()


def test_transform_transformation_func(transformation_func):
# GH 30918
df = DataFrame(
Expand Down