-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: DataFrame.interpolate(axis='columns') throws exception while DataFrame.interpolate(axis=1) not (#25190) #31566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -983,3 +983,11 @@ def test_interp_time_inplace_axis(self, axis): | |
result = expected.interpolate(axis=0, method="time") | ||
expected.interpolate(axis=0, method="time", inplace=True) | ||
tm.assert_frame_equal(result, expected) | ||
|
||
def test_interp_string_axis(self): | ||
# GH 25190 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add a few words here so the reader doesnt need to look up 25190? very brief is OK |
||
x = np.linspace(0, 100, 1000) | ||
y = np.sin(x) | ||
df = pd.DataFrame(data=np.tile(y, (10, 1)), index=np.arange(10), columns=x) | ||
df.reindex(columns=x * 1.005).interpolate(method="linear", axis="columns") | ||
df.reindex(columns=x * 1.005).interpolate(method="linear", axis="index") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jbrockmendel : Does it make sense to also check the results? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think that'd be worthwhile if it isnt too onerous. if nothing else, could check that we get the same result as we would if we passed the ints instead of strings. @YagoGG o do we need the corresponding tests for Series? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove this; the bug was already fixed and this is confusing.