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

Associations nan_replace_value affects original input data #82

Closed
daanknoors opened this issue May 24, 2021 · 3 comments · Fixed by #83
Closed

Associations nan_replace_value affects original input data #82

daanknoors opened this issue May 24, 2021 · 3 comments · Fixed by #83
Labels
bug Something isn't working

Comments

@daanknoors
Copy link

daanknoors commented May 24, 2021

Thanks for all the work on this package - it's been really helpful.

I noticed a minor bug. When running associations or compute_associations the nan_replace_strategy affects the original input data. Hence, if you have a dataframe with NaN values in certain columns, these get replaced in the original input. It would be better to work on a copy of the original data, instead of processing the data inplace.

Pandas gives the following warning:

SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame
@daanknoors daanknoors added the bug Something isn't working label May 24, 2021
@shakedzy
Copy link
Owner

@daanknoors thanks for this - you're right. I think there's an easy fix for it.

@shakedzy shakedzy linked a pull request May 24, 2021 that will close this issue
@shakedzy
Copy link
Owner

Fixed in version 0.6.6

@daanknoors
Copy link
Author

Thanks for the quick fix! Tested it and seems to work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants