![]() ![]() ValueError Traceback (most recent call last)Ĥ jobs_encoder.fit(data.unique().reshape(1, -1)) ![]() It produces the following error (strings in the list are omitted):. Jobs_encoder.fit(data.unique().reshape(1, -1))ĭata = jobs_ansform(data.to_numpy().reshape(-1, 1)) My code below doesn't work: from sklearn.preprocessing import OneHotEncoder I'm trying to replace a column within a Pandas DataFrame containing strings into a one-hot encoded equivalent using Scikit-Learn's OneHotEncoder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |