In [1]:
import pandas as pd

In [2]:
df = pd.DataFrame({'a': [1, 2, 1, 3],
                   'b': [0.4, 1.1, 0.1, 0.8],
                   'c': ['X', 'Y', 'X', 'Z'],
                   'd': [[0, 0], [0, 1], [1, 0], [1, 1]],
                   'e': [True, True, False, True]})

In [3]:
df['f'] = pd.to_datetime(['2018-01-01', '2018-03-15', '2018-02-20', '2018-03-15'])

In [4]:
print(df)


   a    b  c       d      e          f
0  1  0.4  X  [0, 0]   True 2018-01-01
1  2  1.1  Y  [0, 1]   True 2018-03-15
2  1  0.1  X  [1, 0]  False 2018-02-20
3  3  0.8  Z  [1, 1]   True 2018-03-15

In [5]:
print(df.dtypes)


a             int64
b           float64
c            object
d            object
e              bool
f    datetime64[ns]
dtype: object

In [6]:
print(df.select_dtypes(include=int))


   a
0  1
1  2
2  1
3  3

In [7]:
print(df.select_dtypes(include='int'))


   a
0  1
1  2
2  1
3  3

In [8]:
print(df.select_dtypes(include='int64'))


   a
0  1
1  2
2  1
3  3

In [9]:
print(df.select_dtypes(include='int32'))


Empty DataFrame
Columns: []
Index: [0, 1, 2, 3]

In [10]:
print(df.select_dtypes(include=[int, float, 'datetime']))


   a    b          f
0  1  0.4 2018-01-01
1  2  1.1 2018-03-15
2  1  0.1 2018-02-20
3  3  0.8 2018-03-15

In [11]:
print(df.select_dtypes(include='number'))


   a    b
0  1  0.4
1  2  1.1
2  1  0.1
3  3  0.8

In [12]:
print(df.select_dtypes(include=object))


   c       d
0  X  [0, 0]
1  Y  [0, 1]
2  X  [1, 0]
3  Z  [1, 1]

In [13]:
print(type(df.at[0, 'c']))


<class 'str'>

In [14]:
print(type(df.at[0, 'd']))


<class 'list'>

In [15]:
print(df.select_dtypes(exclude='number'))


   c       d      e          f
0  X  [0, 0]   True 2018-01-01
1  Y  [0, 1]   True 2018-03-15
2  X  [1, 0]  False 2018-02-20
3  Z  [1, 1]   True 2018-03-15

In [16]:
print(df.select_dtypes(exclude=[bool, 'datetime']))


   a    b  c       d
0  1  0.4  X  [0, 0]
1  2  1.1  Y  [0, 1]
2  1  0.1  X  [1, 0]
3  3  0.8  Z  [1, 1]

In [17]:
print(df.select_dtypes(include='number', exclude=int))


     b
0  0.4
1  1.1
2  0.1
3  0.8

In [18]:
# print(df.select_dtypes(include=[int, bool], exclude=int))
# ValueError: include and exclude overlap on frozenset({<class 'numpy.int64'>})