比偶工作大事记
Posted marigolci
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了比偶工作大事记相关的知识,希望对你有一定的参考价值。
1.单个文件数据清洗
import re
f=open("/Users/mingai/Downloads/4l8hA-1155-38.69.pdb","r")
lines=f.readlines()
f = open(‘/Users/mingai/Downloads/4l8hA-1155-38.69.txt‘,‘w‘)
ans=[]
patt = ‘-?d+.d+‘
for raw in lines:
list = []
while(re.search(patt,raw)):
c1 = re.search(patt, raw).group()
list.append(c1)
raw=raw.replace(c1,"",1)
if list != []:
ans.append(list[:3])
for i in ans:
if i != []:
f.write(str(i))
f.close()
以上是关于比偶工作大事记的主要内容,如果未能解决你的问题,请参考以下文章
json 可视代码工作室Angular with Firebase片段