Horje
get columns by type pandas Code Example
how to check datatype of column in dataframe python
df['DataFrame Column'].dtypes
get columns by type pandas
In [2]: df = pd.DataFrame({'NAME': list('abcdef'),
    'On_Time': [True, False] * 3,
    'On_Budget': [False, True] * 3})

In [3]: df.select_dtypes(include=['bool'])
Out[3]:
  On_Budget On_Time
0     False    True
1      True   False
2     False    True
3      True   False
4     False    True
5      True   False

In [4]: mylist = list(df.select_dtypes(include=['bool']).columns)

In [5]: mylist
Out[5]: ['On_Budget', 'On_Time']




Python

Related
found features with object datatype Code Example found features with object datatype Code Example
tkinter button command with arguments Code Example tkinter button command with arguments Code Example
print flush python Code Example print flush python Code Example
random int python Code Example random int python Code Example
how to add beautifulsoup to python Code Example how to add beautifulsoup to python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6