I have a dataset of thousands of continuous variables and a few categorical ones. If I use SelectKBest with mutual_info_classif(X, y) then the categorical ones are discarded since they are categorical variables and this function does not work well with them. I know that the categorical ones are important and I want to perform feature selection through SelectKBest only with the continuous ones. I would like to include this in an sklearn pipeline.
How can I tell the sklearn pipeline to perform KBest only on certain columns (the continuous ones in this case)?. Do we always have to select our features in different ways depending on their nature (continous, categorical, etc...)?