@@ -108,11 +108,10 @@ def _groupby_function(name, alias, npfunc, numeric_only=True,
108
108
@Substitution (name = 'groupby' , f = name )
109
109
@Appender (_doc_template )
110
110
@Appender (_local_template )
111
- def f (self , dropna = True ):
111
+ def f (self ):
112
112
self ._set_group_selection ()
113
113
try :
114
- return self ._cython_agg_general (alias , numeric_only = numeric_only ,
115
- dropna = dropna )
114
+ return self ._cython_agg_general (alias , numeric_only = numeric_only )
116
115
except AssertionError as e :
117
116
raise SpecificationError (str (e ))
118
117
except Exception :
@@ -362,7 +361,6 @@ def __init__(self, obj, keys=None, axis=0, level=None, dropna=True,
362
361
self .group_keys = group_keys
363
362
self .squeeze = squeeze
364
363
self .mutated = kwargs .pop ('mutated' , False )
365
- self .dropna = dropna
366
364
367
365
if grouper is None :
368
366
grouper , exclusions , obj = _get_grouper (obj , keys ,
@@ -1529,14 +1527,13 @@ class BaseGrouper(object):
1529
1527
"""
1530
1528
1531
1529
def __init__ (self , axis , groupings , sort = True , group_keys = True ,
1532
- mutated = False , dropna = True ):
1530
+ mutated = False ):
1533
1531
self ._filter_empty_groups = self .compressed = len (groupings ) != 1
1534
1532
self .axis = axis
1535
1533
self .groupings = groupings
1536
1534
self .sort = sort
1537
1535
self .group_keys = group_keys
1538
1536
self .mutated = mutated
1539
- self .dropna = dropna
1540
1537
1541
1538
@property
1542
1539
def shape (self ):
@@ -2486,8 +2483,7 @@ def is_in_obj(gpr):
2486
2483
raise ValueError ('No group keys passed!' )
2487
2484
2488
2485
# create the internals grouper
2489
- grouper = BaseGrouper (group_axis , groupings , sort = sort , mutated = mutated ,
2490
- dropna = dropna )
2486
+ grouper = BaseGrouper (group_axis , groupings , sort = sort , mutated = mutated )
2491
2487
2492
2488
return grouper , exclusions , obj
2493
2489
@@ -3116,9 +3112,9 @@ def _iterate_slices(self):
3116
3112
continue
3117
3113
yield val , slicer (val )
3118
3114
3119
- def _cython_agg_general (self , how , numeric_only = True , dropna = True ):
3115
+ def _cython_agg_general (self , how , numeric_only = True ):
3120
3116
new_items , new_blocks = self ._cython_agg_blocks (
3121
- how , numeric_only = numeric_only , dropna = dropna )
3117
+ how , numeric_only = numeric_only )
3122
3118
return self ._wrap_agged_blocks (new_items , new_blocks )
3123
3119
3124
3120
def _wrap_agged_blocks (self , items , blocks ):
@@ -3144,7 +3140,7 @@ def _wrap_agged_blocks(self, items, blocks):
3144
3140
3145
3141
_block_agg_axis = 0
3146
3142
3147
- def _cython_agg_blocks (self , how , numeric_only = True , dropna = True ):
3143
+ def _cython_agg_blocks (self , how , numeric_only = True ):
3148
3144
data , agg_axis = self ._get_data_to_aggregate ()
3149
3145
3150
3146
new_blocks = []
0 commit comments