@@ -884,33 +884,10 @@ def _chop(self, sdata, slice_obj):
884
884
return sdata ._slice (slice_obj , axis = 1 ) # .loc[:, slice_obj]
885
885
886
886
887
- class NDFrameSplitter (DataSplitter ):
888
-
889
- def __init__ (self , data , labels , ngroups , axis = 0 ):
890
- super (NDFrameSplitter , self ).__init__ (data , labels , ngroups , axis = axis )
891
-
892
- self .factory = data ._constructor
893
-
894
- def _get_sorted_data (self ):
895
- # this is the BlockManager
896
- data = self .data ._data
897
-
898
- # this is sort of wasteful but...
899
- sorted_axis = data .axes [self .axis ].take (self .sort_idx )
900
- sorted_data = data .reindex_axis (sorted_axis , axis = self .axis )
901
-
902
- return sorted_data
903
-
904
- def _chop (self , sdata , slice_obj ):
905
- return self .factory (sdata .get_slice (slice_obj , axis = self .axis ))
906
-
907
-
908
887
def get_splitter (data , * args , ** kwargs ):
909
888
if isinstance (data , Series ):
910
889
klass = SeriesSplitter
911
890
elif isinstance (data , DataFrame ):
912
891
klass = FrameSplitter
913
- else :
914
- klass = NDFrameSplitter
915
892
916
893
return klass (data , * args , ** kwargs )
0 commit comments