MCPcopy
hub / github.com/pandas-dev/pandas / test_fillna_bug

Method test_fillna_bug

pandas/tests/series/methods/test_fillna.py:854–862  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

852
853class TestFillnaPad:
854 def test_fillna_bug(self):
855 ser = Series([np.nan, 1.0, np.nan, 3.0, np.nan], ["z", "a", "b", "c", "d"])
856 filled = ser.ffill()
857 expected = Series([np.nan, 1.0, 1.0, 3.0, 3.0], ser.index)
858 tm.assert_series_equal(filled, expected)
859
860 filled = ser.bfill()
861 expected = Series([1.0, 1.0, 3.0, 3.0, np.nan], ser.index)
862 tm.assert_series_equal(filled, expected)
863
864 def test_ffill_mixed_dtypes_without_missing_data(self):
865 # GH#14956

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
ffillMethod · 0.45
bfillMethod · 0.45

Tested by

no test coverage detected