I was going through a code that I found on the web which uses the indexing technique to select columns when applying transformations to columns using the ColumnTransformer
available in sklearn
. However, I was wondering if there are different alternative ways of doing this selection, if there are please let me know because remembering indexes for columns can be a hard task. I am attaching a sample dataframe code that you can use and I am also attaching the code I found.