4
4
import builtins
5
5
from collections import OrderedDict
6
6
import textwrap
7
- from typing import Dict , FrozenSet , Optional
7
+ from typing import Dict , FrozenSet , List , Optional
8
8
import warnings
9
9
10
10
import numpy as np
@@ -569,7 +569,7 @@ def _aggregate_multiple_funcs(self, arg, _level, _axis):
569
569
try :
570
570
new_res = colg .aggregate (a )
571
571
572
- except ( TypeError , DataError ) :
572
+ except TypeError :
573
573
pass
574
574
else :
575
575
results .append (new_res )
@@ -618,6 +618,23 @@ def _aggregate_multiple_funcs(self, arg, _level, _axis):
618
618
raise ValueError ("cannot combine transform and aggregation operations" )
619
619
return result
620
620
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
+
621
638
def _shallow_copy (self , obj = None , obj_type = None , ** kwargs ):
622
639
"""
623
640
return a new object with the replacement attributes
@@ -633,19 +650,6 @@ def _shallow_copy(self, obj=None, obj_type=None, **kwargs):
633
650
kwargs [attr ] = getattr (self , attr )
634
651
return obj_type (obj , ** kwargs )
635
652
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
-
649
653
650
654
class IndexOpsMixin :
651
655
"""
0 commit comments