We cannot one hot encode the cateogorical columns in train dataframe

As we have encoded the columns of the train data frame. it leads to the generation of new columns and when I’m trying to transform the whole data frame of training inputs it’s throwing an error like “None of the index found in columns.”

Can you please share the link to this notebook?

I’m doing that in Local Host.

You can share this as a Jovian notebook after committing it to Jovian,
First do !pip install jovian, then import jovian and then jovian.commit(project="project_name"). Make sure the notebook is saved before committing. After committing you will get a link to the jovian notebook which you can share with anyone.

http://localhost:8888/notebooks/sklearn-decision-trees-random-forests.ipynb

You probably have to do pd.DataFrame(encoder.transform(.............)) instead of just enocder.transform(.............) and it’s probably a library version issue.