Skip to content

Commit a0fbdd5

Browse files
committed
TST: add regression tests for fixed issue (#25190)
Make sure that DataFrame.interpolate allows setting having "columns" or "index" as the axis argument.
1 parent cc1c406 commit a0fbdd5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/frame/test_missing.py

+8
Original file line numberDiff line numberDiff line change
@@ -983,3 +983,11 @@ def test_interp_time_inplace_axis(self, axis):
983983
result = expected.interpolate(axis=0, method="time")
984984
expected.interpolate(axis=0, method="time", inplace=True)
985985
tm.assert_frame_equal(result, expected)
986+
987+
def test_interp_string_axis(self):
988+
# GH 25190
989+
x = np.linspace(0, 100, 1000)
990+
y = np.sin(x)
991+
df = pd.DataFrame(data=np.tile(y, (10, 1)), index=np.arange(10), columns=x)
992+
df.reindex(columns=x * 1.005).interpolate(method="linear", axis="columns")
993+
df.reindex(columns=x * 1.005).interpolate(method="linear", axis="index")

0 commit comments

Comments
 (0)