@@ -884,33 +884,10 @@ def _chop(self, sdata, slice_obj):
884884 return sdata ._slice (slice_obj , axis = 1 ) # .loc[:, slice_obj]
885885
886886
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-
908887def get_splitter (data , * args , ** kwargs ):
909888 if isinstance (data , Series ):
910889 klass = SeriesSplitter
911890 elif isinstance (data , DataFrame ):
912891 klass = FrameSplitter
913- else :
914- klass = NDFrameSplitter
915892
916893 return klass (data , * args , ** kwargs )
0 commit comments