how to test if a given column is categorical in python code example Example: how to check if the dataframe the category types df.dtype.name