8000 BUG: agg with axis=1 by spencerogden · Pull Request #19605 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: agg with axis=1 #19605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add test to cover addition to frame.aggregate for axis=1 aggregation
  • Loading branch information
spencerogden committed Feb 9, 2018
commit 5a261fce832a10d2929639db33b88a0876632f18
11 changes: 11 additions & 0 deletions pandas/tests/frame/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,3 +1012,14 @@ def test_non_callable_aggregates(self):
expected = df.size

assert result == expected

def test_frame_row_and_column_aggregates(self):
df = DataFrame({'B':[4,5,6,7,8],
'C':[7,8,9,10,11],},
index=[1,2,3,4,5])

assert_series_equal(df.agg('min',axis=1),
Series({1:4,2:5,3:6,4:7,5:8}))

assert_series_equal(df.agg('min',axis=1),
df.T.agg('min').T)
0