I have a Pandas::Series
object with repeated String values that I need to normalise into int
values to feed into a TensorFlow.
I have looked at converting this into a Category
as per this but it creates a code per item rather than identifying duplicates.
e.g. I wish for the following conversion
['a', 'b', 'c', 'd', 'a', 'a', 'c'] -> [1, 2, 3, 4, 1, 1, 3]