select columns based on dtype 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')