Skip to content

Commit

Permalink
TST: extra test case for Series.replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang She authored and wesm committed May 15, 2012
1 parent b57b983 commit a1d4515
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pandas/tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,9 @@ def test_replace(self):
self.assert_((ser[6:10] == -1).all())
self.assert_((ser[20:30] == -1).all())

ser = Series([np.nan, 0, np.inf])
assert_series_equal(ser.replace(np.nan, 0), ser.fillna(0))

ser = Series([np.nan, 0, 'foo', 'bar', np.inf, None, lib.NaT])
assert_series_equal(ser.replace(np.nan, 0), ser.fillna(0))
filled = ser.copy()
Expand Down

0 comments on commit a1d4515

Please sign in to comment.