# -*- coding: utf-8 -*-
"""
Created on Wed Oct 30 20:05:56 2019
@author: Administrator
"""
import re
import pandas as pd
from collections import Counter
data = pd.read_excel(r'C:\Users\Administrator\Desktop\zhongbiao.xls')
yi_all = []
n=0
for i in data['Content']:
text = data['Content'][n]
try:
yi = re.findall('(?:成交供应商|成交公司|第一候选人|包一|乙方|中标单位|中标候选人|供应商|成交人|比选人|中标人|成交单位|设计周期|中标候选单位)(?:名称|)?(?::|:)?.*?([\u4e00-\u9fa5]{0,20}(?:公司|商城|服务中心|传媒中心|检验中心|鉴定中心|经营部|广场|商行|集团|大学|协会|联合会|委员会|管委会|办公室|印刷厂|管理站|团体|厂|局|馆|支队|院))',text)[0]
except:
yi = 'none'
yi_all.append(yi)
n=n+1
print(yi_all)
a = Counter(yi_all)
b = a.most_common()
name=['name','num']
c=pd.DataFrame(columns=name,data=b)
c.to_csv(r'C:\Users\Administrator\Desktop\tongji.csv',encoding='gbk')
统计各公司中标次数
最新推荐文章于 2022-09-07 09:26:17 发布