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

Avoid pandas' SettingWithCopyWarning #5105

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Conversation

piiq
Copy link
Contributor

@piiq piiq commented Jun 4, 2023

When running etf/search the user is met with a pandas warning

image

Apparently even if we use the pattern the warning proposes pandas still can't figure out if the operation is made on the original df or a copy. My current understanding is that this happens because the df is passed into the function.

This PR creates a copy of the dataframe that we will manipulate explicitly so that pandas doesn't have to guess

@piiq piiq added the bug Fix bug label Jun 4, 2023
@reviewpad reviewpad bot added the feat XS Extra small feature label Jun 4, 2023
@jmaslek jmaslek added this pull request to the merge queue Jun 5, 2023
Merged via the queue into develop with commit 5f8657b Jun 5, 2023
@piiq piiq deleted the hotfix/SettingWithCopyWarning branch June 5, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug feat XS Extra small feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants