pandas read_csv

 header=[collumn1,collumn2,.........]

 

#

usecols 读取某一列或者某几列:

import numpy as np
df4=pd.read_csv("./100rowsX15cols_host.csv",usecols=["id","x0"])
print(pd.DataFrame(df4.values,dtype=np.int))

0 1
0 2478 0
1 4258 0
2 1664 0

posted @ 2020-03-10 17:55  不带R的墨菲特  阅读(198)  评论(0编辑  收藏  举报