@@ -241,14 +241,15 @@ def test_fillna_mixed_float(self, mixed_float_frame):
241
241
result = mf .fillna (method = 'pad' )
242
242
_check_mixed_float (result , dtype = dict (C = None ))
243
243
244
- def test_fillna_other (self ):
244
+ def test_fillna_empty (self ):
245
245
# empty frame (GH #2778)
246
246
df = DataFrame (columns = ['x' ])
247
247
for m in ['pad' , 'backfill' ]:
248
248
df .x .fillna (method = m , inplace = True )
249
249
df .x .fillna (method = m )
250
250
251
- # with different dtype (GH3386)
251
+ def test_fillna_different_dtype (self ):
252
+ # with different dtype (GH#3386)
252
253
df = DataFrame ([['a' , 'a' , np .nan , 'a' ], [
253
254
'b' , 'b' , np .nan , 'b' ], ['c' , 'c' , np .nan , 'c' ]])
254
255
@@ -261,6 +262,7 @@ def test_fillna_other(self):
261
262
df .fillna ({2 : 'foo' }, inplace = True )
262
263
assert_frame_equal (df , expected )
263
264
265
+ def test_fillna_limit_and_value (self ):
264
266
# limit and value
265
267
df = DataFrame (np .random .randn (10 , 3 ))
266
268
df .iloc [2 :7 , 0 ] = np .nan
@@ -272,8 +274,9 @@ def test_fillna_other(self):
272
274
result = df .fillna (999 , limit = 1 )
273
275
assert_frame_equal (result , expected )
274
276
277
+ def test_fillna_datelike (self ):
275
278
# with datelike
276
- # GH 6344
279
+ # GH# 6344
277
280
df = DataFrame ({
278
281
'Date' : [pd .NaT , Timestamp ("2014-1-1" )],
279
282
'Date2' : [Timestamp ("2013-1-1" ), pd .NaT ]
@@ -285,8 +288,9 @@ def test_fillna_other(self):
285
288
result = df .fillna (value = {'Date' : df ['Date2' ]})
286
289
assert_frame_equal (result , expected )
287
290
291
+ def test_fillna_tzaware (self ):
288
292
# with timezone
289
- # GH 15855
293
+ # GH# 15855
290
294
df = pd .DataFrame ({'A' : [pd .Timestamp ('2012-11-11 00:00:00+01:00' ),
291
295
pd .NaT ]})
292
296
exp = pd .DataFrame ({'A' : [pd .Timestamp ('2012-11-11 00:00:00+01:00' ),
@@ -299,8 +303,9 @@ def test_fillna_other(self):
299
303
pd .Timestamp ('2012-11-11 00:00:00+01:00' )]})
300
304
assert_frame_equal (df .fillna (method = 'bfill' ), exp )
301
305
306
+ def test_fillna_tzaware_different_column (self ):
302
307
# with timezone in another column
303
- # GH 15522
308
+ # GH# 15522
304
309
df = pd .DataFrame ({'A' : pd .date_range ('20130101' , periods = 4 ,
305
310
tz = 'US/Eastern' ),
306
311
'B' : [1 , 2 , np .nan , np .nan ]})
0 commit comments