You might want to apply different kinds of processing to categorical and numerical features. Instead of manually choosing categorical features or numerical features, ask your pandas DataFrame to select them for you by using df.select_dtypes('data_type')
.
In the example above, you can either include or exclude certain data types using exclude.