@@ -944,23 +944,6 @@ def _cumcount_array(self, ascending=True):
944
944
rev [sorter ] = np .arange (count , dtype = np .intp )
945
945
return out [rev ].astype (np .int64 , copy = False )
946
946
947
- def _index_with_as_index (self , b ):
948
- """
949
- Take boolean mask of index to be returned from apply, if as_index=True
950
-
951
- """
952
- # TODO perf, it feels like this should already be somewhere...
953
- from itertools import chain
954
- original = self ._selected_obj .index
955
- gp = self .grouper
956
- levels = chain ((gp .levels [i ][gp .labels [i ][b ]]
957
- for i in range (len (gp .groupings ))),
958
- (original ._get_level_values (i )[b ]
959
- for i in range (original .nlevels )))
960
- new = MultiIndex .from_arrays (list (levels ))
961
- new .names = gp .names + original .names
962
- return new
963
-
964
947
def _try_cast (self , result , obj , numeric_only = False ):
965
948
"""
966
949
try to cast the result to our obj original type,
@@ -2295,18 +2278,6 @@ def size(self):
2295
2278
index = self .result_index ,
2296
2279
dtype = 'int64' )
2297
2280
2298
- @cache_readonly
2299
- def _max_groupsize (self ):
2300
- """
2301
- Compute size of largest group
2302
- """
2303
- # For many items in each group this is much faster than
2304
- # self.size().max(), in worst case marginally slower
2305
- if self .indices :
2306
- return max (len (v ) for v in self .indices .values ())
2307
- else :
2308
- return 0
2309
-
2310
2281
@cache_readonly
2311
2282
def groups (self ):
2312
2283
""" dict {group name -> group labels} """
@@ -2941,9 +2912,6 @@ def __init__(self, index, grouper=None, obj=None, name=None, level=None,
2941
2912
if isinstance (grouper , MultiIndex ):
2942
2913
self .grouper = grouper .values
2943
2914
2944
- # pre-computed
2945
- self ._should_compress = True
2946
-
2947
2915
# we have a single grouper which may be a myriad of things,
2948
2916
# some of which are dependent on the passing in level
2949
2917
@@ -4964,10 +4932,6 @@ def _wrap_aggregated_output(self, output, names=None):
4964
4932
raise com .AbstractMethodError (self )
4965
4933
4966
4934
4967
- class NDArrayGroupBy (GroupBy ):
4968
- pass
4969
-
4970
-
4971
4935
# ----------------------------------------------------------------------
4972
4936
# Splitting / application
4973
4937
@@ -5020,10 +4984,6 @@ def apply(self, f):
5020
4984
raise com .AbstractMethodError (self )
5021
4985
5022
4986
5023
- class ArraySplitter (DataSplitter ):
5024
- pass
5025
-
5026
-
5027
4987
class SeriesSplitter (DataSplitter ):
5028
4988
5029
4989
def _chop (self , sdata , slice_obj ):
0 commit comments