Function to index categorical features

In my dataframe I would like to write a function to index categorical features – any thoughts

Hi @Azure_Architect_1, you can use the sklearn.preprocessing.LabelEncoder API to index the categorical features. Please refer to this gist for sample code. Thank you!