We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ee7b15 commit 40646e2Copy full SHA for 40646e2
pandas/core/apply.py
@@ -17,10 +17,9 @@
17
from pandas.core.dtypes.generic import ABCSeries
18
19
from pandas.core.construction import create_series_with_explicit_dtype
20
-from pandas.core.frame import DataFrame
21
22
if TYPE_CHECKING:
23
- from pandas import Series, Index
+ from pandas import DataFrame, Series, Index
24
25
ResType = Dict[int, Any]
26
@@ -309,7 +308,7 @@ def apply_standard(self):
309
308
return self.obj._constructor_sliced(result, index=labels)
310
else:
311
if isinstance(partial_result, ABCSeries):
312
- partial_result = DataFrame.infer_objects(partial_result)
+ partial_result = partial_result.infer_objects()
313
314
# compute the result using the series generator
315
results, res_index = self.apply_series_generator(partial_result)
0 commit comments