Skip to content

Commit 2bd760a

Browse files
committed
Updated existing test failures
1 parent 69624f3 commit 2bd760a

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

pandas/tests/frame/test_analytics.py

-3
Original file line numberDiff line numberDiff line change
@@ -1941,12 +1941,9 @@ def test_pct_change(self):
19411941
pnl.iat[1, 1] = np.nan
19421942
pnl.iat[2, 3] = 60
19431943

1944-
mask = pnl.isnull()
1945-
19461944
for axis in range(2):
19471945
expected = pnl.ffill(axis=axis) / pnl.ffill(axis=axis).shift(
19481946
axis=axis) - 1
1949-
expected[mask] = np.nan
19501947
result = pnl.pct_change(axis=axis, fill_method='pad')
19511948

19521949
tm.assert_frame_equal(result, expected)

pandas/tests/frame/test_timeseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def test_pct_change_shift_over_nas(self):
118118
df = DataFrame({'a': s, 'b': s})
119119

120120
chg = df.pct_change()
121-
expected = Series([np.nan, 0.5, np.nan, 2.5 / 1.5 - 1, .2])
121+
expected = Series([np.nan, 0.5, 0., 2.5 / 1.5 - 1, .2])
122122
edf = DataFrame({'a': expected, 'b': expected})
123123
assert_frame_equal(chg, edf)
124124

pandas/tests/series/test_timeseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def test_pct_change_shift_over_nas(self):
352352
s = Series([1., 1.5, np.nan, 2.5, 3.])
353353

354354
chg = s.pct_change()
355-
expected = Series([np.nan, 0.5, np.nan, 2.5 / 1.5 - 1, .2])
355+
expected = Series([np.nan, 0.5, 0., 2.5 / 1.5 - 1, .2])
356356
assert_series_equal(chg, expected)
357357

358358
def test_pct_change_periods_freq(self):

0 commit comments

Comments
 (0)