![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
邓振宁 | NIu BaI
DengZN | NIu BaI
展开
-
python 通过url获取到的图片的io.BytesIO流保存到excel中
python 通过url获取到的图片直接保存插入到excel中import xlsxwriterfrom io import BytesIOimport requests as reqfrom PIL import Imageimport iourl="https://xxxxxx.png" # 图片的urlresponse = req.get(url)img = Image.open(BytesIO(response.content)).convert("RGB")size = (1原创 2021-06-30 14:03:17 · 2107 阅读 · 0 评论 -
pandas对象中的None转化为null NaN 的方法
使用 np 的 fillna(np.nan)import numpy as npdata = mdb.query_pd(sql)print(data) # 对应下图1print(data.fillna(np.nan)) # 对应下图2图1:图2:原创 2021-04-27 17:23:25 · 3842 阅读 · 0 评论 -
mac python意外退出celeryTask handler raised error: WorkerLostError(‘Worker exited prematurely: signal 6
Python 意外退出 解决办法:celery work 后面加 --pool soloobjc[2065]: +[NSApplication initialize] may have been in progress in another thread when fork() was called.objc[2065]: +[NSApplication initialize] may have been in progress in another thread when fork() was原创 2021-04-20 16:09:41 · 2152 阅读 · 3 评论 -
Error: Unable to load celery application. ‘my_background_task‘ object has no attribute ‘user_option
Error: Unable to load celery application. object has no attribute 'user_options'解决办法,在后面加上celery_(此处的celery_为以下celery的设置)Unable to load celery application.object has no attribute ‘user_options’)解决办法,在后面加上celery_(此处的celery_为以下celery的设置)celery_ = Cel原创 2021-03-10 11:30:42 · 750 阅读 · 0 评论 -
python flask raise Exception(“Install ‘email_validator‘ for email validation support.“)
flask-WTF 出现**raise Exception(“Install ‘email_validator’ for email validation support.”)**问题解决办法:安装的 WTForms 模块版本过高导致,版本回退到合适版本即可解决问题!原创 2020-12-02 18:16:00 · 3498 阅读 · 2 评论 -
python is 和 “==”的区别
1、is 比较两个对象的 id 值是否相等,是否指向同一个内存地址;2、== 比较的是两个对象的内容是否相等,值是否相等;原创 2019-08-07 11:10:58 · 146 阅读 · 0 评论 -
python3 thinter tkinter.ttk — Tk主题样式设置
更多详情:来自TTK英文文档(https://docs.python.org/3.4/library/tkinter.ttk.html#tkinter.ttk.Style)1.使用TTK原创 2019-08-31 17:25:57 · 17299 阅读 · 0 评论 -
tkinter ttk.Combobox Combobox 下拉框设置背景颜色
ttk.Combobox,下拉框设置背景颜色代码如下:combostyle = tkinter.ttk.Style()combostyle.theme_create('combostyle', parent='alt', settings={'TCombobox': {...原创 2019-09-02 16:00:15 · 6570 阅读 · 0 评论 -
pip selenium安装出错 Could not find a version that satisfies the requirement selenium (from versions: )
pip install selenium 出现错误Could not find a version that satisfies the requirement selenium (from versions: )No matching distribution found for seleniumYou are using pip version 9.0.3, however versio...原创 2019-10-05 16:59:22 · 20445 阅读 · 1 评论