08 2021 档案

摘要:# 设置显示最大列数 与 显示宽度 pd.set_option('display.max_columns',None) pd.set_option('display.width', 300) 阅读全文
posted @ 2021-08-31 10:40 Hany47315 编辑
摘要:https://mp.weixin.qq.com/s/Ux66-omtEU6EWEWhjQnnyw 添加标题 plt.title('示例标题') 添加图上面的文字 x y 坐标,文本内容。 plt.text(1,2,'function y=x*x') 注释 xy :备注的坐标点 xytext :备注 阅读全文
posted @ 2021-08-30 09:50 Hany47315 编辑
摘要:https://blog.csdn.net/sinat_23133783/article/details/109527366 ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['bo 阅读全文
posted @ 2021-08-29 16:10 Hany47315 编辑
摘要:https://blog.csdn.net/htuhxf/article/details/82986440 fig = plt.figure() 参数matpltlib.pyplot.figure( num = None, # 设定figure名称。系统默认按数字升序命名的figure_num(透视 阅读全文
posted @ 2021-08-29 16:04 Hany47315 编辑
摘要:https://blog.csdn.net/weixin_41789707/article/details/81035997 grid(b, which, axis, color, linestyle, linewidth, **kwargs) b : 布尔值 which : 取值为'major', 阅读全文
posted @ 2021-08-29 15:40 Hany47315 编辑
摘要:参考链接 https://blog.csdn.net/weixin_42227736/article/details/112395017 ax=plt.subplot(111,projection='polar') #设置绘图区域,建立极坐标图 projection='polar' 设置极坐标图 a 阅读全文
posted @ 2021-08-29 15:35 Hany47315 编辑
摘要:参考链接https://blog.csdn.net/weixin_34498545/article/details/112631706 进行初始化 plt.figure(figsize = (8,6)) ax = plt.gca() 调整坐标轴范围 x轴 ax.set_xlim() y轴 ax.se 阅读全文
posted @ 2021-08-29 15:19 Hany47315 编辑
摘要:select COLUMN_NAME from INFORMATION_SCHEMA.Columns where table_name='表名称' and table_schema='数据库名称'; 阅读全文
posted @ 2021-08-29 15:04 Hany47315 编辑
摘要:select table_name from information_schema.tables where table_schema='数据库名称'; select table_name from information_schema.tables where table_schema='数据库名 阅读全文
posted @ 2021-08-29 15:03 Hany47315 编辑
摘要:https://pypi.tuna.tsinghua.edu.cn/simple/ http://mirrors.aliyun.com/pypi/simple/ https://pypi.mirrors.ustc.edu.cn/simple/ http://pypi.douban.com/simpl 阅读全文
posted @ 2021-08-29 14:59 Hany47315 编辑
摘要:acorr add_artist add_callback add_child_axes add_collection add_container add_image add_line add_patch add_table angle_spectrum annotate apply_aspect 阅读全文
posted @ 2021-08-29 14:54 Hany47315 编辑
摘要:原文https://www.bilibili.com/video/BV1tt411e7zF?p=6 阅读全文
posted @ 2021-08-29 14:46 Hany47315 编辑
摘要:exec code in self.locals 错误主要是因为在 python3 环境下 , 进行 debug 调试,源码没有进行更新导致. 需要将 exec code in self.locals 修改为 exec(code in self.locals) 注: 文件名不要写为 code.py 阅读全文
posted @ 2021-08-27 17:02 Hany47315 编辑
摘要:读取时,不读取第一列 data = pd.read_csv('data.csv',index_col=0) df_length = 0 for i in df['列名'].values: if i is not np.nan: df_length += 1 print(df_length) 阅读全文
posted @ 2021-08-27 09:32 Hany47315 编辑
摘要:解决办法 添加参数 ensure_ascii=False json.dumps(字典,ensure_ascii=False) 阅读全文
posted @ 2021-08-26 10:47 Hany47315 编辑
摘要:INSERT INTO 数据表名称(字段1,字段2) SELECT 插入的值1,值2 FROM DUAL WHERE NOT EXISTS(SELECT * FROM 数据表名称 WHERE 字段1= 值1 AND 字段2= 值2) DUAL 不需要进行修改 INSERT INTO table(fi 阅读全文
posted @ 2021-08-26 10:14 Hany47315 编辑
摘要:定义 import threading class hy_Timer(threading.Timer): def __init__(self, interval, function, args=[], kwargs={}): self._original_function = function su 阅读全文
posted @ 2021-08-24 13:41 Hany47315 编辑
摘要:将 self.core.proj_path 替换为 self.aim_path 即可 阅读全文
posted @ 2021-08-24 11:35 Hany47315 编辑
摘要:from datetime import datetime print(datetime.strptime(str(datetime.now()).split('.')[0],"%Y-%m-%d %H:%M:%S")) 阅读全文
posted @ 2021-08-18 10:11 Hany47315 编辑
摘要:在函数前加上 @profile 在终端输入 python -m memory_profiler 文件名.py python -m memory_profiler 阅读全文
posted @ 2021-08-12 16:53 Hany47315 编辑
摘要:使用 recordclass.mutabletuple 方法进行创建元组 使用 recordclass.make_dataclass 创建字典 注:还需要进行添加值信息 import recordclass # 占用更少的内存 # 创建一个元组 Point_tuple = recordclass.m 阅读全文
posted @ 2021-08-11 10:41 Hany47315 编辑
摘要:['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash 阅读全文
posted @ 2021-08-10 13:39 Hany47315 编辑
摘要:使用 time.perf_counter() 替换 time.clock() 即可 阅读全文
posted @ 2021-08-09 14:24 Hany47315 编辑

点击右上角即可分享
微信分享提示