📜  获取 int64 列 pandas - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:18.123000             🧑  作者: Mango

代码示例1
# Use select_dtypes with np.number for select all numeric columns:
cols = [df.select_dtypes([np.number]).columns]
print (list(cols))

# Here is possible specify float64 and int64:
cols = [df.select_dtypes([np.int64,np.float64]).columns]
print (cols)