根据数据类型选择特征 select_dtypes(include=[]/exclude=[])
根据数据类型选择特征 select_dtypes(include=['']/exclude=[])
In [21]:
df.select_dtypes(include=['object']).columns.values
Out[21]:
In [22]:
df.select_dtypes(exclude=['object']).columns.values
Out[22]: