File tree 1 file changed +6
-16
lines changed
1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -636,24 +636,14 @@ def curried(x):
636
636
# TODO: is the above comment accurate?
637
637
raise
638
638
639
- # related to : GH3688
640
- # try item-by-item
641
- # this can be called recursively, so need to raise
642
- # ValueError
643
- # if we don't have this method to indicated to aggregate to
644
- # mark this column as an error
645
- try :
646
- result = self ._aggregate_item_by_item (name , * args , ** kwargs )
647
- assert self .obj .ndim == 2
648
- return result
649
- except AttributeError :
650
- # e.g. SparseArray has no flags attr
651
- # FIXME: 'SeriesGroupBy' has no attribute '_aggregate_item_by_item'
652
- # occurs in idxmax() case
653
- # in tests.groupby.test_function.test_non_cython_api
654
- assert self .obj .ndim == 1
639
+ if self .obj .ndim == 1 :
640
+ # this can be called recursively, so need to raise ValueError
655
641
raise ValueError
656
642
643
+ # GH#3688 try to operate item-by-item
644
+ result = self ._aggregate_item_by_item (name , * args , ** kwargs )
645
+ return result
646
+
657
647
wrapper .__name__ = name
658
648
return wrapper
659
649
You can’t perform that action at this time.
0 commit comments