@@ -283,7 +283,7 @@ def _set_grouper(self, obj, sort=False):
283
283
return self .grouper
284
284
285
285
def _get_binner_for_grouping (self , obj ):
286
- raise NotImplementedError
286
+ raise NotImplementedError ( "Binner for grouping" )
287
287
288
288
@property
289
289
def groups (self ):
@@ -644,7 +644,7 @@ def _python_apply_general(self, f):
644
644
not_indexed_same = mutated )
645
645
646
646
def aggregate (self , func , * args , ** kwargs ):
647
- raise NotImplementedError
647
+ raise NotImplementedError ( "Groupby aggregrate" )
648
648
649
649
@Appender (_agg_doc )
650
650
def agg (self , func , * args , ** kwargs ):
@@ -654,7 +654,7 @@ def _iterate_slices(self):
654
654
yield self .name , self ._selected_obj
655
655
656
656
def transform (self , func , * args , ** kwargs ):
657
- raise NotImplementedError
657
+ raise NotImplementedError ( "Groupby transform" )
658
658
659
659
def mean (self ):
660
660
"""
@@ -1041,7 +1041,7 @@ def _python_agg_general(self, func, *args, **kwargs):
1041
1041
return self ._wrap_aggregated_output (output )
1042
1042
1043
1043
def _wrap_applied_output (self , * args , ** kwargs ):
1044
- raise NotImplementedError
1044
+ raise NotImplementedError ( "Groupby wrap applied output" )
1045
1045
1046
1046
def _concat_objects (self , keys , values , not_indexed_same = False ):
1047
1047
from pandas .tools .merge import concat
@@ -1404,7 +1404,7 @@ def aggregate(self, values, how, axis=0):
1404
1404
swapped = True
1405
1405
values = values .swapaxes (0 , axis )
1406
1406
if arity > 1 :
1407
- raise NotImplementedError
1407
+ raise NotImplementedError ( "BaseGrouper aggregate for arity > 1" )
1408
1408
out_shape = (self .ngroups ,) + values .shape [1 :]
1409
1409
1410
1410
if is_numeric_dtype (values .dtype ):
@@ -1459,7 +1459,7 @@ def _aggregate(self, result, counts, values, how, is_numeric):
1459
1459
comp_ids , _ , ngroups = self .group_info
1460
1460
if values .ndim > 3 :
1461
1461
# punting for now
1462
- raise NotImplementedError
1462
+ raise NotImplementedError ( "BaseGrouper aggregrate for > 3 dimensions" )
1463
1463
elif values .ndim > 2 :
1464
1464
for i , chunk in enumerate (values .transpose (2 , 0 , 1 )):
1465
1465
@@ -1695,7 +1695,7 @@ def _aggregate(self, result, counts, values, how, is_numeric=True):
1695
1695
1696
1696
if values .ndim > 3 :
1697
1697
# punting for now
1698
- raise NotImplementedError
1698
+ raise NotImplementedError ( "BinGrouper aggregate for > 3 dimensions" )
1699
1699
elif values .ndim > 2 :
1700
1700
for i , chunk in enumerate (values .transpose (2 , 0 , 1 )):
1701
1701
agg_func (result [:, :, i ], counts , chunk , self .bins )
@@ -2399,7 +2399,7 @@ def aggregate(self, arg, *args, **kwargs):
2399
2399
if self ._selection is not None :
2400
2400
subset = obj
2401
2401
if isinstance (subset , DataFrame ):
2402
- raise NotImplementedError
2402
+ raise NotImplementedError ( "aggregate not implemented for subset being a Dataframe" )
2403
2403
2404
2404
for fname , agg_how in compat .iteritems (arg ):
2405
2405
colg = SeriesGroupBy (subset , selection = self ._selection ,
@@ -2459,7 +2459,7 @@ def _aggregate_multiple_funcs(self, arg):
2459
2459
from pandas .tools .merge import concat
2460
2460
2461
2461
if self .axis != 0 :
2462
- raise NotImplementedError
2462
+ raise NotImplementedError ( "Currently implemented for axis = 0" )
2463
2463
2464
2464
obj = self ._obj_with_exclusions
2465
2465
@@ -2509,7 +2509,7 @@ def _aggregate_generic(self, func, *args, **kwargs):
2509
2509
return self ._wrap_generic_output (result , obj )
2510
2510
2511
2511
def _wrap_aggregated_output (self , output , names = None ):
2512
- raise NotImplementedError
2512
+ raise NotImplementedError ( "NDFrameGroupBy wrap aggregated output" )
2513
2513
2514
2514
def _aggregate_item_by_item (self , func , * args , ** kwargs ):
2515
2515
# only for axis==0
@@ -3050,7 +3050,7 @@ def _iterate_slices(self):
3050
3050
slice_axis = self ._selection_list
3051
3051
slicer = lambda x : self ._selected_obj [x ]
3052
3052
else :
3053
- raise NotImplementedError
3053
+ raise NotImplementedError ( "Currently implemented for axis = 0" )
3054
3054
3055
3055
for val in slice_axis :
3056
3056
if val in self .exclusions :
@@ -3115,10 +3115,10 @@ def _aggregate_item_by_item(self, func, *args, **kwargs):
3115
3115
new_axes [self .axis ] = self .grouper .result_index
3116
3116
return Panel ._from_axes (result , new_axes )
3117
3117
else :
3118
- raise NotImplementedError
3118
+ raise NotImplementedError ( "Currently implemented for axis>0" )
3119
3119
3120
3120
def _wrap_aggregated_output (self , output , names = None ):
3121
- raise NotImplementedError
3121
+ raise NotImplementedError ( "PanelGroupBy _wrap_aggregated_output" )
3122
3122
3123
3123
3124
3124
class NDArrayGroupBy (GroupBy ):
@@ -3172,7 +3172,7 @@ def _chop(self, sdata, slice_obj):
3172
3172
return sdata .iloc [slice_obj ]
3173
3173
3174
3174
def apply (self , f ):
3175
- raise NotImplementedError
3175
+ raise NotImplementedError ( "DataSplitter apply function" )
3176
3176
3177
3177
3178
3178
class ArraySplitter (DataSplitter ):
0 commit comments