星空博客

2022年12月30日

Python2 Python3 编码问题 操作系统编码 文本编码格式 ansi编码 utf8编码 gb2312中文编码

摘要: 编码问题: 操作系统编码 文本编码 编程脚本中字节数组转字符串默认使用的编码格式 操作系统默认的编码:Windows系统 GBK,Linux系统是utf-8。Windows系统也支持utf-8,需要特殊指定。 文本编码 win10系统创建的文本默认是UTF-8编码,win7系统创建的文本是GBK编码 阅读全文

posted @ 2022-12-30 16:13 星空博客 阅读(225) 评论(0) 推荐(0) 编辑

2021年12月16日

Python:时间日期操作arrow库,如何用一行代码获取上个月是几月

摘要: https://blog.csdn.net/lantian_123/article/details/101518348 使用datetime库实现上个月,特别麻烦,需要多行代码 , 用 datetime.replace 方法将 month-1 ,咋看起来没问题,实际上这是有 bug 的,month 阅读全文

posted @ 2021-12-16 10:00 星空博客 阅读(184) 评论(0) 推荐(0) 编辑

2021年6月7日

用python识别验证码

摘要: https://zhuanlan.zhihu.com/p/32285628 阅读全文

posted @ 2021-06-07 14:29 星空博客 阅读(23) 评论(0) 推荐(0) 编辑

python爬虫学习 获取特殊验证值

摘要: https://zhuanlan.zhihu.com/p/27696188 阅读全文

posted @ 2021-06-07 11:00 星空博客 阅读(25) 评论(0) 推荐(0) 编辑

Python爬虫模拟登录带验证码网站

摘要: https://www.cnblogs.com/wenhongyu/p/7280790.html 阅读全文

posted @ 2021-06-07 10:01 星空博客 阅读(104) 评论(0) 推荐(0) 编辑

2021年5月19日

Anaconda安装库时出现错误,ERROR: Cannot uninstall 'wrapt'. 解决办法

摘要: ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead 阅读全文

posted @ 2021-05-19 14:25 星空博客 阅读(299) 评论(0) 推荐(0) 编辑

2021年1月19日

matplotlib 绘图

摘要: https://www.cnblogs.com/nxld/p/7435930.html http://whuhan2013.github.io/blog/2016/09/16/python-matplotlib-learn/ 阅读全文

posted @ 2021-01-19 17:30 星空博客 阅读(49) 评论(0) 推荐(0) 编辑

2021年1月15日

pandas df 排序 按列选取

摘要: # mlist = np.arange(0, math.ceil(max_eqMag), 0.1) # df_b = df_b[df_b['eq_count']>0]# print(df_b)## df_b.sort_values("m",inplace=True,ascending=False)# 阅读全文

posted @ 2021-01-15 09:16 星空博客 阅读(1249) 评论(0) 推荐(0) 编辑

2021年1月14日

python数据线性拟合(I)

摘要: 线性拟合是数据处理中一种比较常用的方式。但是拟合的方法也又好几种。 1、第一版代码(网上学习别人的,感觉用的是平均数方法,最小二乘法自己处理的感觉) #! /usr/bin/env python # -*- coding: utf-8 -*- import numpy as np ###使用的数学模 阅读全文

posted @ 2021-01-14 18:05 星空博客 阅读(3554) 评论(0) 推荐(0) 编辑

简单线性回归(最小二乘法)python实现

摘要: 简单线性回归(最小二乘法)python实现 https://www.cnblogs.com/arli/p/11428205.html python_numpy最小二乘法直线、曲线拟合 https://www.jianshu.com/p/354b1f2a5fd0 0.引入依赖 import numpy 阅读全文

posted @ 2021-01-14 17:13 星空博客 阅读(688) 评论(0) 推荐(0) 编辑

导航