if you are loading your data using pandas , you can use pd.get_dummies
it will automaticly encode categorical features , you can also set columns yourself
more on https://pandas.pydata.org/docs/reference/api/pandas.get_dummies.html