eagleye

上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 45 下一页

2024年7月17日

Python读Excel数据,创建Word文档上下文字典列表,元素为字典(新)

摘要: # 读Excel数据,创建Word文档上下文字典列表,元素为每个培训人员的上下文字典 def create_docx_context_dict_list(_excel_path): """ 输入参数: :param _excel_path:Excel全路径 功能:创建Word文档上下文字典列表,元素 阅读全文

posted @ 2024-07-17 22:05 GoGrid 阅读(23) 评论(0) 推荐(0)

Python使用指定数据、索引、列名创建DataFrame

摘要: data = [[109, 119, 98], [106, 99, 85], [108, 110, 104], [102, 99]] # 数据 name = ['King', 'Order', 'God', 'Dd'] # 索引 columns = ['语文', '数学', "英语"] # 列名 d 阅读全文

posted @ 2024-07-17 17:17 GoGrid 阅读(39) 评论(0) 推荐(0)

Python解决FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.

摘要: from io import StringIO try: resp = requests.get(url) # pd.set_option('future.no_silent_downcasting', True) # 不提示函数在未来版本中将被替代的警告 df = pd.read_html(Str 阅读全文

posted @ 2024-07-17 16:54 GoGrid 阅读(1427) 评论(0) 推荐(0)

2024年7月15日

Python读Excel数据,创建Word文档上下文字典列表,元素为字典

摘要: # 读Excel数据,创建Word文档上下文字典列表,元素为每个培训人员的上下文字典 def read_sheet(_path_excel): """ :param _path_excel:Excel全路径 功能:读Excel数据,创建Word文档上下文字典列表,元素为每个培训人员的上下文字典 字典 阅读全文

posted @ 2024-07-15 18:07 GoGrid 阅读(19) 评论(0) 推荐(0)

2024年7月11日

Python获取指定文件夹下倒数第二个文件夹的全路径列表

摘要: # 获取指定文件夹下倒数第二个文件夹的全路径列表 def get_penultimate_folder_list(path): """ :param path:指定文件夹 功能:返回指定文件夹下倒数第二个文件夹的全路径列表 """ path = Path(path) assert path.exis 阅读全文

posted @ 2024-07-11 10:06 GoGrid 阅读(69) 评论(0) 推荐(0)

2024年7月6日

Python以边沿裁剪图片

摘要: 1 # 以边沿裁剪图片 2 def crop_image_by_border(image, l_mm=0, t_mm=0, r_mm=0, b_mm=0): 3 # 计算新的宽度和高度(像素单位) 4 l_dot = int(l_mm / inch_to_mm * dpi) # 左边 5 t_dot 阅读全文

posted @ 2024-07-06 17:14 GoGrid 阅读(37) 评论(0) 推荐(0)

Python以中心裁剪图片,一个中国大陆身份证的尺寸是88mm*55mm,通常使用的身份证像素分辨率是336*256

摘要: 1 # 以中心裁剪图片 2 # 一个中国大陆身份证的尺寸是88mm*55mm,通常使用的身份证像素分辨率是336*256 3 def crop_image_by_center(input_image_path, width_mm=88, height_mm=55): 4 # 打开图片 5 image 阅读全文

posted @ 2024-07-06 17:13 GoGrid 阅读(102) 评论(0) 推荐(0)

Python按身份证实际大小调整图片尺寸

摘要: # 按身份证实际大小调整图片尺寸 def resize_image_by_id(image, width_mm=86, height_mm=55): # 四周裁掉5mm # image = crop_image_by_border(image, 5, 5, 5, 5) # 四周裁掉5mm # 计算新 阅读全文

posted @ 2024-07-06 17:09 GoGrid 阅读(51) 评论(0) 推荐(0)

Python按证件照实际大小调整图片尺寸,2英寸证件照:35mmx49mm

摘要: # 按证件照实际大小调整图片尺寸,2英寸证件照:35mmx49mm(2024年7月6日) def resize_image_by_ip(input_image_path, width_mm=35, height_mm=49): input_image_path = Path(input_image_ 阅读全文

posted @ 2024-07-06 17:05 GoGrid 阅读(111) 评论(0) 推荐(0)

2024年7月2日

转发:Python_关于使用【zipfile】解压路径中文乱码问题-直接修改【zipfile.py】源码 —— 简单粗暴且有效

摘要: 参考网址:https://blog.csdn.net/weixin_45681435/article/details/133276120 阅读全文

posted @ 2024-07-02 17:47 GoGrid 阅读(9) 评论(0) 推荐(0)

上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 45 下一页

导航