dataframe get columns of type 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')