|
本帖最后由 sheeboard 于 2020-11-2 18:45 编辑
- import pandas as pd
- import re
- a=[]
- with open('test','r') as f:
- for line in f.readlines():
- temp=re.split('\s+',line.strip())
- if len(temp)==7:
- a.append(temp)
- df=pd.DataFrame(a,columns=['a','b','c','d','e','f','g'])
复制代码
参考 |
|