Skip to content

Commit a82479a

Browse files
author
Daniel Saxton
committed
Only apply on non-empty agg_axis
1 parent d9b620b commit a82479a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/apply.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def apply_empty_result(self):
212212
except Exception:
213213
pass
214214

215-
if reduce:
215+
if reduce and len(self.agg_axis):
216216
r = self.f(Series([]), *self.args, **self.kwds)
217217
return self.obj._constructor_sliced(r, index=self.agg_axis)
218218
else:

0 commit comments

Comments
 (0)