@@ -210,16 +210,22 @@ def f():
210
210
def test_count_nonnumeric_types (self ):
211
211
# GH12541
212
212
df_inf = DataFrame ({'x' : [1 , 2 , 3 ], 'y' : [1. , 2. , np .Inf ]})
213
- df_date = DataFrame ({'x' : [1 , 2 , 3 ], 'y' : pd .date_range ('20130101' ,periods = 3 )})
213
+ df_date = DataFrame ({'x' : [1 , 2 , 3 ],
214
+ 'y' : pd .date_range ('20130101' ,periods = 3 )})
214
215
df_inf_date = DataFrame ({'x' : [1 , 2 , 3 ], 'y' : [1. , 2. , np .Inf ],
215
216
'z' : pd .date_range ('20170101' ,periods = 3 )})
216
217
217
- expected_1 = DataFrame ([[1 ,1 ],[2 ,2 ],[2 ,2 ]], columns = ['x' ,'y' ], dtype = float )
218
- expected_2 = DataFrame ([[1 ,1 ,1 ],[2 ,2 ,2 ],[2 ,2 ,2 ]], columns = ['x' ,'y' ,'z' ], dtype = float )
219
-
220
- self .assert_frame_equal (df_inf .rolling (window = 2 ).count (), expected_1 )
221
- self .assert_frame_equal (df_date .rolling (window = 2 ).count (), expected_1 )
222
- self .assert_frame_equal (df_inf_date .rolling (window = 2 ).count (), expected_2 )
218
+ expected_1 = DataFrame ([[1 ,1 ],[2 ,2 ],[2 ,2 ]],
219
+ columns = ['x' ,'y' ], dtype = float )
220
+ expected_2 = DataFrame ([[1 ,1 ,1 ],[2 ,2 ,2 ],[2 ,2 ,2 ]],
221
+ columns = ['x' ,'y' ,'z' ], dtype = float )
222
+
223
+ self .assert_frame_equal (df_inf .rolling (window = 2 ).count (),
224
+ expected_1 )
225
+ self .assert_frame_equal (df_date .rolling (window = 2 ).count (),
226
+ expected_1 )
227
+ self .assert_frame_equal (df_inf_date .rolling (window = 2 ).count (),
228
+ expected_2 )
223
229
224
230
def test_window_with_args (self ):
225
231
tm ._skip_if_no_scipy ()
0 commit comments