随笔分类 -  python

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 25 下一页
python学习
摘要:python 报错 TabError:缩进中不一致地使用制表符和空格 解决方法该bug的原因是,各行存在不同的缩进空格,未统一化。只需将出错的代码行及其前边的所有行,全选中,统一还原靠左边,然后再统一执行缩进快捷键即可! 阅读全文
posted @ 2023-04-08 15:56 myrj 阅读(210) 评论(0) 推荐(0)
摘要:import cv2 cameraCapture = cv2.VideoCapture('./1/11.mp4') success, frame = cameraCapture.read() while success: if cv2.waitKey(1) == 27: break cv2.imsh 阅读全文
posted @ 2023-04-08 07:59 myrj 阅读(203) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python # coding: utf-8 # @author: sSWans # @file: main.py # @time: 2018/1/11 15:54 import os import random from _datetime import dateti 阅读全文
posted @ 2023-04-07 09:46 myrj 阅读(318) 评论(0) 推荐(0)
摘要:高德应用登录 进入控制台 查看应用 高德应用帮助 阅读全文
posted @ 2023-04-06 15:00 myrj 阅读(22) 评论(0) 推荐(0)
摘要:from openpyxl import load_workbook wb=load_workbook('anju.xlsx') sheet=wb.active for uu in range(1,100): sheet.cell(row=uu,column=6).value=zuijin(av1, 阅读全文
posted @ 2023-04-05 16:29 myrj 阅读(31) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-04-04 10:32 myrj 阅读(7) 评论(0) 推荐(0)
摘要:python idle粘贴后自动关闭 复制内容不能太多(特别是代码最后大量的注释尽量去掉) 阅读全文
posted @ 2023-04-04 08:49 myrj 阅读(41) 评论(0) 推荐(0)
摘要:地址: https://s3plus.meituan.net/v1/mss_0a06a471f9514fc79c981b5466f56b91/svgtextcss/613fff6be20fe7f21b684ca92c05dc86.css 阅读全文
posted @ 2023-04-02 21:48 myrj 阅读(72) 评论(0) 推荐(0)
摘要:fitz模块打开PDF文件报错:RuntimeError(f“Directory '{directory}' does not exist”)RuntimeError: Directory 'static/' does not exist from import fitz解决方案:删除fitzpip 阅读全文
posted @ 2023-03-31 15:56 myrj 阅读(1328) 评论(0) 推荐(0)
摘要:import ospath="d:\\python37" filetype=".pdf" #遍历包括子文件夹 def get_filename(path,filetype): filetype1=filetype.upper() #print(filetype) name =[] final_nam 阅读全文
posted @ 2023-03-31 10:02 myrj 阅读(342) 评论(0) 推荐(0)
摘要:from selenium import webdriver import os import time import json def browser_initial(): """" 进行浏览器初始化 """ os.chdir('D:\\') browser = webdriver.Chrome( 阅读全文
posted @ 2023-03-29 09:07 myrj 阅读(609) 评论(0) 推荐(0)
摘要:先将指定位置设定为当前目录 import os os.chdir('E:\qi') with open("1.txt", "w") as f: f.write(jsonCookies) 阅读全文
posted @ 2023-03-29 09:03 myrj 阅读(90) 评论(0) 推荐(0)
摘要:pandas 保存.dta文件时报错: UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-2: ordinal not in range(256) import pandas as pd df = pd 阅读全文
posted @ 2023-03-27 10:34 myrj 阅读(462) 评论(0) 推荐(0)
摘要:df.columns.tolist() ['pid', 'fid18', 'age', 'pidhaizi', 'pidhaizia', 'pidhaizib', 'pidhaizic', 'pidhaizid', 'pidhaizie', 'pidhaizif', 'pidhaizig', 'mi 阅读全文
posted @ 2023-03-26 15:21 myrj 阅读(129) 评论(0) 推荐(0)
摘要:import numpy as np iux=np.nan_to_num(row[ii],nan=99999)#判断如果是缺失值,则改为99999 阅读全文
posted @ 2023-03-26 08:30 myrj 阅读(107) 评论(0) 推荐(0)
摘要:if re.match('\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', str(lba[1])): print(1) 阅读全文
posted @ 2023-03-25 08:32 myrj 阅读(320) 评论(0) 推荐(0)
摘要:import warnings warnings.filterwarnings("ignore") 阅读全文
posted @ 2023-03-25 07:04 myrj 阅读(57) 评论(0) 推荐(0)
摘要:# 1. 构造Timestamp # ts_input参数支持4种格式,datetime-like, str, int, float # 1.1 datetime-like import datetime import pandas as pd time_str = "2020-08-01 10:2 阅读全文
posted @ 2023-03-24 19:19 myrj 阅读(86) 评论(0) 推荐(0)
摘要:import os from pdf2image import convert_from_path from PIL import Image def nerge_inages(inages): images = [Image.open(x) for x in images] vidths, hei 阅读全文
posted @ 2023-03-23 18:13 myrj 阅读(253) 评论(0) 推荐(0)
摘要:import pyreadstat as pyreadstat dataframe, meta = pyreadstat.read_dta("1.dta") #stata变量标签: print(meta.column_labels) #stata变量名: print(meta.column_name 阅读全文
posted @ 2023-03-23 15:52 myrj 阅读(192) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 25 下一页