I have a Series that look like this:
13624 A
25257 D
15359 D
26226 D
10797 D
..
9733 D
25121 D
10143 C
1448 B
13627 B
Name: points, Length: 10189, dtype: object
And I want to apply the LabelEncoder() function from sklearn.preprocessing and replace all the values.
The le.fit_transform(y_train) function returns this:
array([0, 3, 3, ..., 2, 1, 1])
This array is ordered by the original index, so the idea is to replace exactly the value column with this array.
How can I do that?