4mon
Que.com on MSNBeginner’s Guide to Encoding Categorical Data: Visuals and Code Exampledf = pd.DataFrame(data) label_encoder = LabelEncoder() df['Color_Encoded'] = label_encoder.fit_transform(df['Color']) print(df) Output: Color Color_Encoded 0 Red 2 1 Blue 0 2 Green 1 3 Blue 0 4 ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results