96
96
ops ,
97
97
)
98
98
from pandas .core .accessor import CachedAccessor
99
- from pandas .core .apply import series_apply
99
+ from pandas .core .apply import SeriesApply
100
100
from pandas .core .arrays import ExtensionArray
101
101
from pandas .core .arrays .categorical import CategoricalAccessor
102
102
from pandas .core .arrays .sparse import SparseAccessor
@@ -4003,7 +4003,7 @@ def aggregate(self, func=None, axis=0, *args, **kwargs):
4003
4003
if func is None :
4004
4004
func = dict (kwargs .items ())
4005
4005
4006
- op = series_apply (self , func , args = args , kwargs = kwargs )
4006
+ op = SeriesApply (self , func , convert_dtype = False , args = args , kwargs = kwargs )
4007
4007
result = op .agg ()
4008
4008
return result
4009
4009
@@ -4019,7 +4019,9 @@ def transform(
4019
4019
) -> FrameOrSeriesUnion :
4020
4020
# Validate axis argument
4021
4021
self ._get_axis_number (axis )
4022
- result = series_apply (self , func = func , args = args , kwargs = kwargs ).transform ()
4022
+ result = SeriesApply (
4023
+ self , func = func , convert_dtype = True , args = args , kwargs = kwargs
4024
+ ).transform ()
4023
4025
return result
4024
4026
4025
4027
def apply (
@@ -4131,7 +4133,7 @@ def apply(
4131
4133
Helsinki 2.484907
4132
4134
dtype: float64
4133
4135
"""
4134
- return series_apply (self , func , convert_dtype , args , kwargs ).apply ()
4136
+ return SeriesApply (self , func , convert_dtype , args , kwargs ).apply ()
4135
4137
4136
4138
def _reduce (
4137
4139
self ,
0 commit comments