I wonder how I query and get the the category for a given value
For example, with the following code I map the four strings to four categories
cat_type = pd.api.types.CategoricalDtype(categories=['c1', 'c2', 'c3', 'c4'])
Now I want to query and get the category for another value, something like
cat_for_c1 = cat_type.<somehting>('c1')
where as cat_for_c1
represents the category not the string value. It seems that there is no <something>
according to the documentation.
Is it possible otherwise?