get all dtypes of the columns in pandas code example
Example: get columns based on dtype pandas
>>df.select_dtypes(include='object').columns
Index(['C', 'D'], dtype='object')
>>df.select_dtypes(include='object').columns
Index(['C', 'D'], dtype='object')