Skip to content

Conversation

@glemaitre
Copy link
Member

Related to #23626

SettingWithCopyWarning was moved from pandas.core.common to pandas.errors.
Since this is only in our test, I think that we can just fix our test without requesting a change in pandas.

if hasattr(pd.errors, "SettingWithCopyWarning"):
SettingWithCopyWarning = pd.errors.SettingWithCopyWarning
else:
SettingWithCopyWarning = pd.core.common.SettingWithCopyWarning
Copy link
Member

Choose a reason for hiding this comment

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

A comment with the pandas version would be nice here so that we know when we can remove it . This line is for pandas < 1.5 I think.

@lesteve
Copy link
Member

lesteve commented Jun 20, 2022

I pushed a commmit adding a commit with the pandas version, merging this one, thanks!

@lesteve lesteve merged commit 8a07dc2 into scikit-learn:main Jun 20, 2022
ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Jul 11, 2022
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Aug 4, 2022
glemaitre added a commit that referenced this pull request Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants