@@ -500,16 +500,6 @@ def _transform_general(self, func: Callable, *args, **kwargs) -> Series:
500
500
def _can_use_transform_fast (self , result ) -> bool :
501
501
return True
502
502
503
- def _wrap_transform_fast_result (self , result : Series ) -> Series :
504
- """
505
- fast version of transform, only applicable to
506
- builtin/cythonizable functions
507
- """
508
- ids , _ , _ = self .grouper .group_info
509
- result = result .reindex (self .grouper .result_index , copy = False )
510
- out = algorithms .take_nd (result ._values , ids )
511
- return self .obj ._constructor (out , index = self .obj .index , name = self .obj .name )
512
-
513
503
def filter (self , func , dropna : bool = True , * args , ** kwargs ):
514
504
"""
515
505
Return a copy of a Series excluding elements from groups that
@@ -1271,19 +1261,6 @@ def _can_use_transform_fast(self, result) -> bool:
1271
1261
self ._obj_with_exclusions .columns
1272
1262
)
1273
1263
1274
- def _wrap_transform_fast_result (self , result : DataFrame ) -> DataFrame :
1275
- """
1276
- Fast transform path for aggregations
1277
- """
1278
- obj = self ._obj_with_exclusions
1279
-
1280
- # for each col, reshape to size of original frame by take operation
1281
- ids , _ , _ = self .grouper .group_info
1282
- result = result .reindex (self .grouper .result_index , copy = False )
1283
- output = result .take (ids , axis = 0 )
1284
- output .index = obj .index
1285
- return output
1286
-
1287
1264
def _define_paths (self , func , * args , ** kwargs ):
1288
1265
if isinstance (func , str ):
1289
1266
fast_path = lambda group : getattr (group , func )(* args , ** kwargs )
0 commit comments