44import builtins
55from collections import OrderedDict
66import textwrap
7- from typing import Dict , FrozenSet , Optional
7+ from typing import Dict , FrozenSet , List , Optional
88import warnings
99
1010import numpy as np
@@ -569,7 +569,7 @@ def _aggregate_multiple_funcs(self, arg, _level, _axis):
569569 try :
570570 new_res = colg .aggregate (a )
571571
572- except ( TypeError , DataError ) :
572+ except TypeError :
573573 pass
574574 else :
575575 results .append (new_res )
@@ -618,6 +618,23 @@ def _aggregate_multiple_funcs(self, arg, _level, _axis):
618618 raise ValueError ("cannot combine transform and aggregation operations" )
619619 return result
620620
621+ def _get_cython_func (self , arg : str ) -> Optional [str ]:
622+ """
623+ if we define an internal function for this argument, return it
624+ """
625+ return self ._cython_table .get (arg )
626+
627+ def _is_builtin_func (self , arg ):
628+ """
629+ if we define an builtin function for this argument, return it,
630+ otherwise return the arg
631+ """
632+ return self ._builtin_table .get (arg , arg )
633+
634+
635+ class ShallowMixin :
636+ _attributes = [] # type: List[str]
637+
621638 def _shallow_copy (self , obj = None , obj_type = None , ** kwargs ):
622639 """
623640 return a new object with the replacement attributes
@@ -633,19 +650,6 @@ def _shallow_copy(self, obj=None, obj_type=None, **kwargs):
633650 kwargs [attr ] = getattr (self , attr )
634651 return obj_type (obj , ** kwargs )
635652
636- def _get_cython_func (self , arg : str ) -> Optional [str ]:
637- """
638- if we define an internal function for this argument, return it
639- """
640- return self ._cython_table .get (arg )
641-
642- def _is_builtin_func (self , arg ):
643- """
644- if we define an builtin function for this argument, return it,
645- otherwise return the arg
646- """
647- return self ._builtin_table .get (arg , arg )
648-
649653
650654class IndexOpsMixin :
651655 """
0 commit comments