Skip to content

Commit

Permalink
Merge pull request #372 from machow/test-fast-groups
Browse files Browse the repository at this point in the history
tests(pandas) generic fast_mutate test
  • Loading branch information
machow authored Jan 13, 2022
2 parents fa546ed + 7b4fd6b commit b76ba35
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions siuba/experimental/pd_groups/test_pd_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ def test_agg_groupby_broadcasted_equal_to_transform(f_op, f_dst):

# Test generic functions ======================================================

def test_fast_mutate_basic():
# sanity check of https://github.com/machow/siuba/issues/355
from siuba.siu import _

res_df = data_default.groupby("g") >> fast_mutate(num = _.x / _.y * 100)

res = res_df.num
dst = data_default.x / data_default.y * 100

assert_series_equal(res.obj, dst, check_names=False)


# Test user-defined functions =================================================

Expand Down

0 comments on commit b76ba35

Please sign in to comment.