读取csv文件
编码为utf-8,不设置第一列索引
import pandas as pd
zhuanti = pd.read_csv(open('C:/MongoDB/Server/3.4/bin/xiaozhu.csv',encoding='utf-8'))
print(zhuanti)
编码为utf-8,设置第一列索引
import pandas as pd
zhuanti = pd.read_csv(open('C:/MongoDB/Server/3.4/bin/xiaozhu.csv',encoding='utf-8'),index_col=0)
print(zhuanti)
网友评论