skrub icon indicating copy to clipboard operation
skrub copied to clipboard

CHORE - Refactor SingleColumnTransformer so it's in its own file

Open rcap107 opened this issue 1 month ago • 3 comments

This is a minor fix, but I think it would be helpful for the readability of the code.

At the moment, the SingleColumnTransformer is in the file _apply_to_cols.py, with additional code for the docs and the RejectColumn exception. I think this has historical reasons, going back to when _on_each_column was private.

However now that ApplyToCols is out I think we should separate the functions so that SingleColumnTransformer is in its own file.

rcap107 avatar Nov 03 '25 17:11 rcap107

makes sense!

jeromedockes avatar Nov 04 '25 07:11 jeromedockes

can I work on this? Since this is a good-first-issue, would like to begin here if possible.

techy4shri avatar Dec 07 '25 18:12 techy4shri

Hi @techy4shri yes you can work on it, thank you for offering! The SingleColumnTransformer, RejectColumn exception and the associated helpers _SINGLE_COL_LINE, _SINGLE_COL_PARAGRAPH, _SINGLE_COL_NOTE, _wrap_add_check_single_column, _insert_after_first_paragraph would move to a separate module, _single_column_transformer.py

jeromedockes avatar Dec 07 '25 19:12 jeromedockes