I label encoded my categorical data into numerical data using label encoder
data['Resi'] = LabelEncoder().fit_transform(data['Resi'])
But I when I try to find how they are mapped internally using
list(LabelEncoder.inverse_transform(data['Resi']))
I am getting below error
TypeError Traceback (most recent call last)
<ipython-input-67-419ab6db89e2> in <module>()
----> 1 list(LabelEncoder.inverse_transform(data['Resi']))
TypeError: inverse_transform() missing 1 required positional argument: 'y'
How to fix this
Sample data
Resi
IP
IP
IP
IP
IP
IE
IP
IP
IP
IP
IP
IPD
IE
IE
IP
IE
IP
IP
IP