摘要: 数据库维护之时,报错1292 sql如下 update 表1 left join 表2 on 表1.关联字段 = 表2.关联字段 set 表1.更新字段 = 表2.字段 where 表2.字段 != '' and 表2.字段 !='#VALUE!' and 表2.字段 != 0 and 表2.字段 阅读全文
posted @ 2022-11-23 10:39 meizhengchao 阅读(2752) 评论(0) 推荐(0) 编辑
摘要: 数据库200多万条数据,整表关联更新耗时8个小时没有结果 索性尝试了一下储存过程划分数据循环更新,耗时453秒,真香 delimiter // # 定义//为一句sql的结束标志,取消;的所代表的意义 drop procedure if exists test; # 如果存在名字为test的proc 阅读全文
posted @ 2022-11-22 13:10 meizhengchao 阅读(537) 评论(0) 推荐(0) 编辑
摘要: talib文档 --> Math Operators from talib import * import numpy as np a = np.arange(10) a = a.astype('float') # print(a) # array([ 0., 1., 2., 3., 4., 5., 阅读全文
posted @ 2022-11-21 12:41 meizhengchao 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 可变参数作为对象的默认值的时候 创建不同的对象(均为默认值)的时候,默认值会具有相同的引用 def f(a = []): a.append(1) return a print(f()) print(f()) print(f()) # 输出 # [1] # [1, 1] # [1, 1, 1] 正确的 阅读全文
posted @ 2022-11-08 13:13 meizhengchao 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 数值数据分类后交叉,但是数据量少,或者划分标准不科学 导致分类的类别有缺失,交叉后会丧失类别,数据不齐整 import numpy as np import pandas as pd df = pd.DataFrame(np.random.rand(100,2)) bins = np.arange( 阅读全文
posted @ 2022-11-06 14:02 meizhengchao 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 因为数据量太大,需要用x轴滑块选择范围看数据 同时,范围内的数据维度太多,导致图形比较乱 需要将trace绘制到不同的子图中 产生了将x轴的滑块滑动范围同步的需求 实现方法是共享x轴 import plotly as py from plotly import graph_objects as go 阅读全文
posted @ 2022-11-06 12:19 meizhengchao 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 目标做链接数据库的数据维护小脚本,可查询下载上传更新数据库的数据 获取上传文件与下载文件路径 from PyQt5.QtWidgets import QFileDialog, QMessageBox class Window_WH(): def __init__(self): self.mainwi 阅读全文
posted @ 2022-10-01 18:08 meizhengchao 阅读(110) 评论(0) 推荐(0) 编辑
摘要: # plotly 中的标记样式表 ['circle', 'square', 'diamond', 'cross', 'x', 'triangle-up', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-ne', 'tria 阅读全文
posted @ 2022-09-17 11:41 meizhengchao 阅读(193) 评论(0) 推荐(0) 编辑
摘要: pandas 转化 数据为DataFrame后,DataFrame不能够print 否则会报错AttributeError: 'NoneType' object has no attribute 'total_seconds' #data的数据结构大致为[{...,'datetime':dateti 阅读全文
posted @ 2022-09-14 21:16 meizhengchao 阅读(1954) 评论(0) 推荐(1) 编辑
摘要: 基于优先获取item的想法,最下级请求最优先 请求优先级是基于scrapy有很多请求要发起的情况 priority越大请求越优先 不在设置中修改配置 scrapy代码太复杂,这是目前可以接受的解决办法 class xxxspiderSpider(scrapy.Spider): # 三级请求优先级逐级 阅读全文
posted @ 2022-08-16 15:24 meizhengchao 阅读(299) 评论(0) 推荐(0) 编辑