I can't transform the dataframe to add encoded columns

I am getting the following error.


Please help me.