相关文章推荐
稳重的八宝粥  ·  visual studio ...·  1 年前    · 
from lxml import etree from multiprocessing . dummy import Pool from requests . exceptions import RequestException import openpyxl from fake_useragent import UserAgent from urllib . parse import urlencode import pandas as pd import os os . chdir ( r 'C:\Users\\ABC\Desktop' ) import datetime date = datetime . datetime . now ( ) . strftime ( '%Y-%m-%d' ) base_url = 'https://caigou.chinatelecom.com.cn/MSS-PORTAL/announcementjoin/list.do?provinceJT=NJT' headers = { 'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36' , 'X-Requested-With' : 'XMLHttpRequest' formdata = { 'provinceJT' : 'NJT' , 'provinceCode' : 12 , 'provinceNames' : '重庆' , 'paging.start' : 1 , 'paging.pageSize' : 10 , 'pageNum' : 10 , 'goPageNum' : 1 , 'paging.start' : 1 , 'paging.pageSize' : 10 , 'pageNum' : 10 , 'goPageNum' : 1 base_url = base_url + urlencode ( formdata ) tb = pd . read_html ( base_url , header = 0 ) [ 3 ] tb [ '时间' ] = tb [ '创建时间日期' ] . apply ( lambda x : x . split ( ' ' ) [ 0 ] ) new_xm = tb [ tb [ '时间' ] == max ( tb [ '时间' ] ) ] #------------------------------------------------------------------------------- yd = pd . read_excel ( '中国移动采购与招标网-采集的数据-后羿采集器.xlsx' , header = 2 ) new_yd = yd [ yd [ '时间' ] == max ( yd [ '时间' ] ) ] # --------------------------------------------------------------- lt = pd . read_excel ( '联通的数据-后羿采集器.xlsx' , header = 0 ) new_lt = lt [ lt [ '时间' ] == max ( lt [ '时间' ] ) ] import xlwt f = xlwt . Workbook ( ) #创建工作薄 sheet1 = f . add_sheet ( u 'sheet1' , cell_overwrite_ok = True ) #创建sheet pattern = xlwt . Pattern ( ) pattern . pattern = xlwt . Pattern . SOLID_PATTERN pattern . pattern_fore_colour = 5 style = xlwt . XFStyle ( ) style . pattern = pattern al = xlwt . Alignment ( ) al . horz = 0x02 # 设置水平居中 al . vert = 0x01 # 设置垂直居中 style . alignment = al # 获取字典的键 styleBlueBkg = xlwt . easyxf ( 'pattern: pattern solid, fore_colour yellow;' ) # 红色 for s in range ( len ( new_yd . iloc [ : , 0 ] ) ) : sheet1 . write ( 0 , 0 , '移动' , styleBlueBkg ) #循环写入 竖着写 sheet1 . write ( 0 , 1 , '' ) #循环写入 竖着写 sheet1 . write ( 0 , 2 , '' ) #循环写入 竖着写 sheet1 . write ( 0 , 3 , '' ) #循环写入 竖着写 sheet1 . write ( 1 , 0 , '采购需求单位' ) #循环写入 竖着写 sheet1 . write ( 1 , 1 , '公告类型' ) #循环写入 竖着写 sheet1 . write ( 1 , 2 , '标题' ) #循环写入 竖着写 sheet1 . write ( 1 , 3 , '时间' ) #循环写入 竖着写 sheet1 . write ( s + 2 , 0 , new_yd . iloc [ : , 0 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( s + 2 , 1 , new_yd . iloc [ : , 1 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( s + 2 , 2 , new_yd . iloc [ : , 2 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( s + 2 , 3 , new_yd . iloc [ : , 3 ] [ s ] ) #循环写入 竖着写 for s in range ( len ( new_xm . iloc [ : , 0 ] ) ) : sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 0 , '电信' , styleBlueBkg ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 1 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 2 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 3 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 4 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 5 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 6 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 7 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 , 8 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 0 , '省份' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 1 , '是否终止' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 2 , '公告名称' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 3 , '公告编码' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 4 , '公告类型' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 5 , '创建时间' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 6 , '开始时间' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 7 , '截止时间' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 , 8 , '时间' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 0 , new_xm . iloc [ : , 0 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 1 , new_xm . iloc [ : , 1 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 2 , new_xm . iloc [ : , 2 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 3 , new_xm . iloc [ : , 3 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 4 , new_xm . iloc [ : , 4 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 5 , new_xm . iloc [ : , 5 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 6 , new_xm . iloc [ : , 6 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 7 , new_xm . iloc [ : , 7 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + s + 1 , 8 , new_xm . iloc [ : , 8 ] [ s ] ) #循环写入 竖着写 for s in range ( len ( new_lt . iloc [ : , 0 ] ) ) : sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 , 0 , '联通' , styleBlueBkg ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 , 1 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 3 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 , 2 , '' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 , 0 , '公告' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 , 1 , '时间' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 , 2 , '省份' ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 + s + 1 , 0 , new_lt . iloc [ : , 0 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 + s + 1 , 1 , new_lt . iloc [ : , 1 ] [ s ] ) #循环写入 竖着写 sheet1 . write ( len ( new_yd . iloc [ : , 0 ] ) + 4 + len ( new_xm . iloc [ : , 0 ] ) + 1 + 2 + s + 1 , 2 , new_lt . iloc [ : , 2 ] [ s ] ) #循环写入 竖着写 f . save ( '移动、电信、联通最新数据(' + date + ')' + '.xls' ) #保存文件 import timeimport requestsfrom lxml import etreefrom multiprocessing.dummy import Poolfrom requests.exceptions import RequestExceptionimport openpyxlfrom fake_useragent import UserAgentfrom urllib.parse import urlencodeimport pandas as pdimport o import pandas as pd url_name = 'https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=chinaDayList,chinaDayAddList,nowConfirmStatis,provinceCompare' html_name = requests.get(url_name) data_name=jso from lxml import etree from multiprocessing.dummy import Pool from requests.exceptions import RequestException import openpyxl import re from fake_useragent import UserAgent def get_one_page(url): res = req
数据 中心pdu 招标 技术规范书是对 招标 企业提出的技术要求和规范化要求的书面文件,旨在保证企业 招标 的设备满足企业需要,达到一定标准和质量,能够保证设备的安全性、可靠性、稳定性和环保性。具体来说, 招标 书针对 数据 中心的PDU设备,应包含以下要求和规范: 首先, 招标 书必须明确要求供应商使用国际先进技术和高标准材料进行PDU产品设计和制造,不得使用任何二手零配件和低成本材料进行制造; 其次,PDU设备的容量、质量、性能、卫生标准等应符合国内外的相关标准和要求,设备整体应满足防护等级IP20及以上标准,能够保证设备的稳定性和安全性,并应具有远程监控、管理和控制功能; 同时, 招标 书应要求提供商的售后服务能够完善,承担PDU设备的质保期和维修服务,对产品故障做出迅速响应,快速解决问题并保证设备安全可靠地运行; 最后,信誉度和售后服务的评价也是非常重要的, 招标 企业应该审查和评估 招标 商的经营实力、资质认证、合法性等,选择信誉良好的企业作为合作伙伴,确保 招标 合同的顺利执行。 总之,PDU设备是 数据 中心的核心设施, 招标 规范应根据实际需要制定,实现 数据 中心能够高效、安全运行,提高设备的可靠性和稳定性,向用户提供更好的服务。
weixin_52180974: NameError Traceback (most recent call last) Cell In[50], line 4 1 # 构建类别平衡的数据集 2 from sklearn.utils import shuffle ----> 4 newPosDf = newPosDf[:3305] # 直接选取前3305条样本 5 data = pd.concat([data, newPosDf]) # 竖向拼接 6 # data = shuffle(data).reset_index(drop=True) NameError: name 'newPosDf' is not defined newPosDf = newPosDf[:3305]报错啊 [pyecharts学习笔记]——全局配置项(VisualMapOpts视觉映射配置项) conroe123: 请问为什么我写了is_show=True,就会报错,意外实参,不写的话反而没事 绘图杂记【4】R语言corrplot绘制相关图 泰勒的麦克劳林次幂: 楼主写的很全面很详细,谢谢楼主的分享! [pyecharts学习笔记]——系统配置项(MarkPointOpts标记点配置项) 请教大神,coord一次只能写一对坐标吗,