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

Adjust keep_cols logic #109

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sarahyurick
Copy link
Collaborator

Closes #108.

I have found that setting op.Labeler(labels, cols=[prob_col], keep_cols=[prob_col], suffix=label_col) allows the probability column to be kept (without having to specify df[prob_col] = 0) and setting op.Labeler(labels, cols=[prob_col], suffix=label_col) allows the user the drop the probability column.

My confusion from before came because I would try to set keep_cols=[label_col, prob_col] which would cause an error because the label_col does not exist yet. Thus, if the user attempts to pass the label column (i.e., suffix) into keep_cols, I think that CrossFit should automatically drop it out of keep_cols, since the label column is kept no matter what.

Signed-off-by: Sarah Yurick <[email protected]>
Signed-off-by: Sarah Yurick <[email protected]>
@sarahyurick sarahyurick requested a review from VibhuJawa January 16, 2025 20:22
query_id = f"q{i+1}"
query_id = f"q{i + 1}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.

Create prob_col on the CrossFit side
1 participant