def test_apply_column(): result = compute(t.amount.apply(np.sum, 'real'), df) expected = np.sum(df['amount']) assert result == expected result = compute(t.amount.apply(builtins.sum, 'real'), df) expected = builtins.sum(df['amount']) assert result == expected
def test_apply_column(): result = compute(Apply(np.sum, t['amount']), df) expected = np.sum(df['amount']) assert str(result) == str(expected) result = compute(Apply(builtins.sum, t['amount']), df) expected = builtins.sum(df['amount']) assert str(result) == str(expected)
def test_apply_column(): result = compute(Apply(t['amount'], np.sum), df) expected = np.sum(df['amount']) assert str(result) == str(expected) result = compute(Apply(t['amount'], builtins.sum), df) expected = builtins.sum(df['amount']) assert str(result) == str(expected)