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

Several calls to generate_xy_splits in a notebook with no drop_columns specified causes KeyError #19

Closed
david-ryan-alviola opened this issue Mar 17, 2021 · 0 comments · Fixed by #20
Labels
bug Something isn't working

Comments

@david-ryan-alviola
Copy link
Owner

If generate_xy_splits is called without a list passed into drop_columns, a default list is constructed and the target is appended to it. However, calling generate_xy_splits again with no list passed in will attempt to append the new target to the default list resulting in a list of ['target1', 'target2']. The 'target1' key may not be in the new dataframe, resulting in a KeyError.

Recommend creating a new list each time generate_xy_splits is called.

@david-ryan-alviola david-ryan-alviola added the bug Something isn't working label Mar 17, 2021
@david-ryan-alviola david-ryan-alviola added this to To do in Utilities repo project via automation Mar 17, 2021
@david-ryan-alviola david-ryan-alviola moved this from To do to In progress in Utilities repo project Mar 17, 2021
Utilities repo project automation moved this from In progress to Done Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
1 participant