File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed
Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -1234,23 +1234,11 @@ def median(self, **kwargs):
12341234 Series or DataFrame
12351235 Median of values within each group.
12361236 """
1237- try :
1238- return self ._cython_agg_general (
1239- "median" ,
1240- alt = lambda x , axis : Series (x ).median (axis = axis , ** kwargs ),
1241- ** kwargs
1242- )
1243- except GroupByError :
1244- raise
1245- except Exception :
1246-
1247- def f (x ):
1248- if isinstance (x , np .ndarray ):
1249- x = Series (x )
1250- return x .median (axis = self .axis , ** kwargs )
1251-
1252- with _group_selection_context (self ):
1253- return self ._python_agg_general (f )
1237+ return self ._cython_agg_general (
1238+ "median" ,
1239+ alt = lambda x , axis : Series (x ).median (axis = axis , ** kwargs ),
1240+ ** kwargs
1241+ )
12541242
12551243 @Substitution (name = "groupby" )
12561244 @Appender (_common_see_also )
You can’t perform that action at this time.
0 commit comments