Skip to content
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

TST (string dtype): clean-up interpolate tests #60653

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jorisvandenbossche
Copy link
Member

Small follow-up on #60637: move the code checking for the error for non-numeric data to a separate test, so we can actually still test the "basic" behaviour properly in the case there are only numeric columns. And remove the xfail for the non-range index case.

@jorisvandenbossche jorisvandenbossche added Testing pandas testing functions or related to the test suite Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Strings String extension data type and string data labels Jan 3, 2025
@jorisvandenbossche jorisvandenbossche added this to the 3.0 milestone Jan 3, 2025
@WillAyd
Copy link
Member

WillAyd commented Jan 3, 2025

Milestone should be 2.3 right?

Comment on lines -104 to -112
if not using_infer_string:
with pytest.raises(TypeError, match=msg):
df.set_index("C").interpolate()
else:
result = df.set_index("C").interpolate()
expected = df.set_index("C")
expected.loc[3, "A"] = 2.66667
expected.loc[5, "B"] = 9
tm.assert_frame_equal(result, expected)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this test was showing an API discrepancy between object vs string dtypes. Maybe just open an issue to track?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Strings String extension data type and string data Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants