We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61f432f commit cb68153Copy full SHA for cb68153
pandas/core/apply.py
@@ -204,17 +204,15 @@ def apply_empty_result(self):
204
from pandas import Series
205
206
if not reduce:
207
-
208
- EMPTY_SERIES = Series([])
209
try:
210
- r = self.f(EMPTY_SERIES, *self.args, **self.kwds)
+ r = self.f(Series([]))
211
reduce = not isinstance(r, Series)
212
except Exception:
213
pass
214
215
if reduce:
216
if len(self.agg_axis):
217
- r = self.f(Series([]), *self.args, **self.kwds)
218
else:
219
r = np.nan
220
0 commit comments