Answers for "onehotencoder some columns"

0

onehotencoder some columns

# Categorical boolean mask
categorical_feature_mask = X.dtypes==object

# filter categorical columns using mask and turn it into a list
categorical_cols = X.columns[categorical_feature_mask].tolist()
Posted by: Guest on April-02-2020

Code answers related to "onehotencoder some columns"

Python Answers by Framework

Browse Popular Code Answers by Language