Skip to content

Commit cb68153

Browse files
author
Daniel Saxton
committed
Don't unpack args twice
1 parent 61f432f commit cb68153

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/apply.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,15 @@ def apply_empty_result(self):
204204
from pandas import Series
205205

206206
if not reduce:
207-
208-
EMPTY_SERIES = Series([])
209207
try:
210-
r = self.f(EMPTY_SERIES, *self.args, **self.kwds)
208+
r = self.f(Series([]))
211209
reduce = not isinstance(r, Series)
212210
except Exception:
213211
pass
214212

215213
if reduce:
216214
if len(self.agg_axis):
217-
r = self.f(Series([]), *self.args, **self.kwds)
215+
r = self.f(Series([]))
218216
else:
219217
r = np.nan
220218

0 commit comments

Comments
 (0)