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

Addresses SettingWithCopyWarning in read_csv_with_nan #2053

Merged
merged 1 commit into from
May 24, 2022

Conversation

geoffreyangus
Copy link
Collaborator

This PR addresses the SettingWithCopyWarning that appears in integration tests using tests.integration_tests.utils.read_csv_with_nan.

SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df[col].iloc[row] = np.nan

@geoffreyangus geoffreyangus changed the title Addresses SettingWithCopyWarning in tests.integration_tests.utils.read_csv_with_nan Addresses SettingWithCopyWarning in read_csv_with_nan May 24, 2022
@github-actions
Copy link

Unit Test Results

       6 files  ±0         6 suites  ±0   2h 18m 6s ⏱️ + 7m 9s
2 798 tests ±0  2 763 ✔️ ±0    35 💤 ±0  0 ±0 
8 394 runs  ±0  8 285 ✔️ ±0  109 💤 ±0  0 ±0 

Results for commit 5abaa7e. ± Comparison against base commit dd6ba79.

@geoffreyangus geoffreyangus merged commit 1218de3 into master May 24, 2022
@geoffreyangus geoffreyangus deleted the suppress-assign-warning-pd branch May 24, 2022 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants