@@ -181,7 +181,7 @@ def test_transform_axis(tsframe):
181
181
tm .assert_frame_equal (result , expected )
182
182
183
183
ts = ts .T
184
- grouped = ts .groupby (lambda x : x .weekday (), axis = 1 , dropna = False )
184
+ grouped = ts .groupby (lambda x : x .weekday (), axis = 1 )
185
185
result = ts - grouped .transform ("mean" )
186
186
expected = grouped .apply (lambda x : (x .T - x .mean (1 )).T )
187
187
tm .assert_frame_equal (result , expected )
@@ -194,7 +194,7 @@ def test_transform_axis(tsframe):
194
194
tm .assert_frame_equal (result , expected )
195
195
196
196
ts = ts .T
197
- grouped = ts .groupby (lambda x : x .weekday (), axis = 1 , dropna = False )
197
+ grouped = ts .groupby (lambda x : x .weekday (), axis = 1 )
198
198
result = ts - grouped .transform ("mean" )
199
199
expected = grouped .apply (lambda x : (x .T - x .mean (1 )).T )
200
200
tm .assert_frame_equal (result , expected )
@@ -313,7 +313,7 @@ def test_dispatch_transform(tsframe):
313
313
314
314
filled = grouped .fillna (method = "pad" )
315
315
fillit = lambda x : x .fillna (method = "pad" )
316
- expected = df .groupby (lambda x : x .month , dropna = False ).transform (fillit )
316
+ expected = df .groupby (lambda x : x .month ).transform (fillit )
317
317
tm .assert_frame_equal (filled , expected )
318
318
319
319
@@ -412,10 +412,10 @@ def nsum(x):
412
412
return np .nansum (x )
413
413
414
414
results = [
415
- df .groupby ("col1" , dropna = False ).transform (sum )["col2" ],
416
- df .groupby ("col1" , dropna = False )["col2" ].transform (sum ),
417
- df .groupby ("col1" , dropna = False ).transform (nsum )["col2" ],
418
- df .groupby ("col1" , dropna = False )["col2" ].transform (nsum ),
415
+ df .groupby ("col1" ).transform (sum )["col2" ],
416
+ df .groupby ("col1" )["col2" ].transform (sum ),
417
+ df .groupby ("col1" ).transform (nsum )["col2" ],
418
+ df .groupby ("col1" )["col2" ].transform (nsum ),
419
419
]
420
420
for result in results :
421
421
tm .assert_series_equal (result , expected , check_names = False )
@@ -612,7 +612,8 @@ def test_cython_transform_series(op, args, targop):
612
612
613
613
# series
614
614
for data in [s , s_missing ]:
615
- expected = data .groupby (labels , dropna = False ).transform (targop )
615
+ # print(data.head())
616
+ expected = data .groupby (labels ).transform (targop )
616
617
617
618
tm .assert_series_equal (expected , data .groupby (labels ).transform (op , * args ))
618
619
tm .assert_series_equal (expected , getattr (data .groupby (labels ), op )(* args ))
0 commit comments