I am using
pd.get_dummies
to transform categorical vector with 4 labels (strings) to 2d array with 4 columns. However, after I coudln't find a way to go back to the original values afterwards. I also couldn't do this when using
sklearn.preprocessing.OneHotEncoder
What is the best wat to one-hot-encode categorcal vector but have the ability to inverse the original value afterwards?