Skip to content

Conversation

@wikip50700
Copy link

This PR improves the documentation for the Drop class by adding docstrings and a user guide section with an example showing how to use Drop with ApplyToCols.

``Drop`` is a single-column transformer that removes the column it is
applied to and produces no output features. Unlike :class:`DropCols`,
which operates on a full DataFrame, ``Drop`` is designed to be used in
column-wise contexts such as :class:`ApplyToCols`, data ops, or internally
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
column-wise contexts such as :class:`ApplyToCols`, data ops, or internally
column-wise contexts such as :class:`ApplyToCols`, Data Ops, or internally

@rcap107
Copy link
Member

rcap107 commented Jan 12, 2026

Hi @wikip50700, thanks for this PR. I think it's already in a good shape, however before merging I would like to add also an example with the Data Ops similar to what is written in the original issue #1756:

.skb.apply(skrub.choose_from([StringEncoder(), Drop()]))

The reasoning for the choose_from there is that it's not clear whether the given column is useful or not, so it would be good to find that out using hyperparmeter tuning. The example should be in /doc/modules/data_ops/validation/hyperparameter_tuning.rst, after the section on feature selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC - improve the documentation of the Drop transformer

3 participants