1>>df.select_dtypes(include='object').columns
2
3Index(['C', 'D'], dtype='object')
4
1In [2]: df = pd.DataFrame({'NAME': list('abcdef'),
2 'On_Time': [True, False] * 3,
3 'On_Budget': [False, True] * 3})
4
5In [3]: df.select_dtypes(include=['bool'])
6Out[3]:
7 On_Budget On_Time
80 False True
91 True False
102 False True
113 True False
124 False True
135 True False
14
15In [4]: mylist = list(df.select_dtypes(include=['bool']).columns)
16
17In [5]: mylist
18Out[5]: ['On_Budget', 'On_Time']
19