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 exception block
  • Loading branch information
spencerogden committed Feb 8, 2018
commit f5698d5abaee1eea79cd0a58a3b84bd95d7d735e
4 changes: 3 additions & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4807,8 +4807,8 @@ def _gotitem(self, key, ndim, subset=None):
def aggregate(self, func, axis=0, *args, **kwargs):
axis = self._get_axis_number(axis)

# TODO: flipped axis
result = None

if axis == 0:
try:
result, how = self._aggregate(func,
Expand All @@ -4821,6 +4821,8 @@ def aggregate(self, func, axis=0, *args, **kwargs):
result, how = self.T._aggregate(func,
_axis=0,
*args, **kwargs).T
except TypeError:
pass
if result is None:
return self.apply(func, axis=axis, args=args, **kwargs)
return result
Expand Down
0