赞
踩
目录
import pandas as pd
- data = pd.read_table('D:/desktop/TestFile.txt',encoding='utf-8')
-
- print(data)
txt文件的默认分隔符为/t
- data = pd.read_table('D:/desktop/TestFile.txt',encoding='utf-8',sep='\t')
-
- print(data)
- data = pd.read_table('D:/desktop/TestCSV.csv',encoding='gbk',sep=',')
-
- print(data)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。