上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页
摘要: 一、表结构一致 允许插入重复数据 insert into 表1 select * from 表2; 不允许插入重复数据 insert into 表1 select * from 表2 where NOT EXISTS (select * from 表1 where 字段1 = 表2.字段1); 二、 阅读全文
posted @ 2022-06-22 12:21 eliwang 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 只需要两步操作: 先执行: mr = db.runCommand({ "mapreduce" : "具体集合名", "map" : function() { for (var key in this) { emit(key, null); } }, "reduce" : function(key, 阅读全文
posted @ 2022-05-12 14:07 eliwang 阅读(1804) 评论(0) 推荐(0) 编辑
摘要: 代码: from selenium import webdriver # 导入webdriver def get_driver(): options = webdriver.ChromeOptions() # 设置谷歌浏览器的一些配置选项 options.add_argument('--window 阅读全文
posted @ 2022-05-12 13:48 eliwang 阅读(1063) 评论(0) 推荐(0) 编辑
摘要: 一、安装fitz(需要依赖PyMuPDF) pip install fitz pip install pymupdf 二、代码演示 import os import pytesseract import cv2 as cv import fitz from PIL import Image from 阅读全文
posted @ 2022-05-06 20:47 eliwang 阅读(15449) 评论(0) 推荐(0) 编辑
摘要: 1、需要使用到datetime模块中的 datetime,timedelta,timezone from datetime import datetime,timezone,timedelta # 导模块 2、datetme实例的replace()方法可以给实例添加时区信息tzinfo,并返回一个新 阅读全文
posted @ 2022-03-31 18:58 eliwang 阅读(2393) 评论(0) 推荐(0) 编辑
摘要: 使用连接查询来实现: update a inner join b on a.num = b.num set a.num_id = b.id; a表中的num字段和b中的num字段值相等,就将b表的id值写入a表的num_id字段 阅读全文
posted @ 2022-03-17 13:43 eliwang 阅读(1952) 评论(0) 推荐(0) 编辑
摘要: 一、出现这种问题的原因 游标连接单次最大超时时间为10分钟,单次从mongo服务端获取的数据为101条或者1~16M,如果在10分钟内,未处理完获取的所有数据,则会报异常 二、解决方案 1、设置 no_cursor_timeout=True,即游标连接永不超时,需要手动关闭游标(可以利用with上下 阅读全文
posted @ 2022-03-01 13:28 eliwang 阅读(991) 评论(0) 推荐(0) 编辑
摘要: 思路:利用 pymupdf+pytesseract 通过pymupdf提取pdf文件中的图片,并写入到本地,然后利用tesseract-ocr去处理 1、安装pymupdf pip install pymupdf 虽然安装的库为pymupdf,实际上调用的包名为fitz 2、示例:提取pdf文件图片 阅读全文
posted @ 2022-02-18 18:01 eliwang 阅读(2614) 评论(0) 推荐(0) 编辑
摘要: openpyxl库不能够处理xls格式excel文件,这里可以使用python自带的包xlrd来进行处理 1、导包 import xlrd 2、打开文件 df = xlrd.open_workbook("test.xls") 3、sheet操作 # 获取sheet表单名 ['sheet1','she 阅读全文
posted @ 2022-02-17 15:39 eliwang 阅读(1939) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 from idna import unichr def all_to_half(all_string): """全角转半角""" half_string = "" for char in all_string: inside_code = ord(char) if in 阅读全文
posted @ 2021-12-23 20:25 eliwang 阅读(449) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页