@@ -1149,7 +1149,7 @@ def test_between(self):
1149
1149
expected = s [5 :16 ].dropna ()
1150
1150
assert_series_equal (result , expected )
1151
1151
1152
- def test_scalar_na_cmp (self ):
1152
+ def test_scalar_na_cmp_corners (self ):
1153
1153
s = Series ([2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ])
1154
1154
s [::2 ] = np .nan
1155
1155
@@ -1158,6 +1158,14 @@ def tester(a, b):
1158
1158
1159
1159
self .assertRaises (ValueError , tester , s , datetime (2005 ,1 ,1 ))
1160
1160
1161
+ s = Series ([2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,datetime (2005 ,1 ,1 )])
1162
+ s [::2 ] = np .nan
1163
+
1164
+ assert_series_equal (tester (s , list (s )), s )
1165
+
1166
+ d = DataFrame ({'A' :s })
1167
+ self .assertRaises (TypeError , tester , s , d )
1168
+
1161
1169
def test_idxmin (self ):
1162
1170
# test idxmin
1163
1171
# _check_stat_op approach can not be used here because of isnull check.
@@ -2047,7 +2055,7 @@ def test_ne(self):
2047
2055
def test_pad_nan (self ):
2048
2056
x = TimeSeries ([np .nan , 1. , np .nan , 3. , np .nan ],
2049
2057
['z' , 'a' , 'b' , 'c' , 'd' ], dtype = float )
2050
- x = x .fillna (method = 'pad' )
2058
+ x .fillna (method = 'pad' , inplace = True )
2051
2059
expected = TimeSeries ([np .nan , 1.0 , 1.0 , 3.0 , 3.0 ],
2052
2060
['z' , 'a' , 'b' , 'c' , 'd' ], dtype = float )
2053
2061
assert_series_equal (x [1 :], expected [1 :])
0 commit comments