关闭页面特效

随笔分类 -  Python相关记录

python相关的学习笔记
摘要:实现代码 import numpy as np import pandas as pd from collections import Counter def chimerge(data, attr, label, max_intervals): distinct_vals = sorted(set 阅读全文
posted @ 2020-08-30 17:19 hichens 阅读(563) 评论(0) 推荐(0) 编辑
摘要:from pyecharts.charts import * from pyecharts.components import Table from pyecharts import options as opts from pyecharts.commons.utils import JsCode 阅读全文
posted @ 2020-08-20 10:50 hichens 阅读(3642) 评论(3) 推荐(1) 编辑
摘要:图的布局 from pyecharts.charts import * from pyecharts.components import Table from pyecharts import options as opts from pyecharts.commons.utils import J 阅读全文
posted @ 2020-08-19 21:24 hichens 阅读(2791) 评论(1) 推荐(0) 编辑
摘要:from pyecharts.charts import * from pyecharts.components import Table from pyecharts import options as opts from pyecharts.commons.utils import JsCode 阅读全文
posted @ 2020-08-19 20:36 hichens 阅读(827) 评论(0) 推荐(0) 编辑
摘要:使用seaborn进行数据可视化¶ seaborn 简介¶ Seaborn是一种基于matplotlib的图形可视化python libraty。它提供了一种高度交互式界面,便于用户能够做出各种有吸引力的统计图表。Seaborn其实是在matplotlib的基础上进行了更高级的API封装,从而使得作 阅读全文
posted @ 2020-07-13 20:42 hichens 阅读(740) 评论(0) 推荐(0) 编辑
摘要:第9章 时序数据 import pandas as pd import numpy as np 一、时序的创建 1. 四类时间变量 现在理解可能关于③和④有些困惑,后面会作出一些说明 名称 描述 元素类型 创建方式 ① Date times(时间点/时刻) 描述特定日期或时间点 Timestamp 阅读全文
posted @ 2020-07-11 21:53 hichens 阅读(414) 评论(0) 推荐(0) 编辑
摘要:第6章 缺失数据¶ 在接下来的两章中,会接触到数据预处理中比较麻烦的类型,即缺失数据和文本数据(尤其是混杂型文本)¶ Pandas在步入1.0后,对数据类型也做出了新的尝试,尤其是Nullable类型和String类型,了解这些可能在未来成为主流的新特性是必要的¶ In [1]: import pa 阅读全文
posted @ 2020-07-11 11:37 hichens 阅读(581) 评论(0) 推荐(0) 编辑
摘要:第5章 合并 import numpy as np import pandas as pd df = pd.read_csv('data/table.csv') df.head() School Class ID Gender Address Height Weight Math Physics 0 阅读全文
posted @ 2020-07-11 11:27 hichens 阅读(323) 评论(0) 推荐(0) 编辑
摘要:{{uploading-image-382865.png(uploading...)}} 第4章 变形 import numpy as np import pandas as pd df = pd.read_csv('data/table.csv') df.head() School Class I 阅读全文
posted @ 2020-07-11 11:24 hichens 阅读(196) 评论(0) 推荐(0) 编辑
摘要:第3章 分组 import numpy as np import pandas as pd df = pd.read_csv('data/table.csv',index_col='ID') df.head() School Class Gender Address Height Weight Ma 阅读全文
posted @ 2020-07-09 20:35 hichens 阅读(221) 评论(0) 推荐(0) 编辑
摘要:第2章 索引 import numpy as np import pandas as pd df = pd.read_csv('data/table.csv',index_col='ID') df.head() School Class Gender Address Height Weight Ma 阅读全文
posted @ 2020-07-08 15:10 hichens 阅读(161) 评论(0) 推荐(0) 编辑
摘要:第1章 Pandas基础 import pandas as pd import numpy as np 查看Pandas版本 pd.__version__ '1.0.3' 一、文件读取与写入 1. 读取 (a)csv格式 df = pd.read_csv('data/table.csv') df.h 阅读全文
posted @ 2020-07-08 14:40 hichens 阅读(204) 评论(0) 推荐(0) 编辑
摘要:有一个model的字段是 DateTimeField,我现在要具体查询某一天date的数据,应该怎么用orm来查询呢? 指定年月日 YourModel.objects.filter(datetime_published__year='2008', datetime_published__month= 阅读全文
posted @ 2020-06-03 14:45 hichens 阅读(1636) 评论(0) 推荐(0) 编辑
摘要:各系统都可以通过修改用户目录下的 .condarc 文件。 Windows 用户无法直接创建名为 .condarc 的文件,可先执行 conda config set show_channel_urls yes 生成该文件之后再修改。 在.condarc 文件中添加镜像 阅读全文
posted @ 2020-04-03 14:40 hichens 阅读(1684) 评论(0) 推荐(0) 编辑
摘要:1.生成数据集 y=Xw+b+ϵ 其中, 噪声项 ϵ 服从均值为0、标准差为0.01的正态分布。 一些数据已经给出 2.定义一个函数:它每次返回batch_size( 阅读全文
posted @ 2020-03-26 22:51 hichens 阅读(266) 评论(0) 推荐(0) 编辑
摘要:主要介绍了Spyder常见的快捷键,从spyder的配置表中导出,中文名称为直译。 常用快捷键 快捷键 中文名称 Ctrl+R 替换文本 Ctrl+1 单行注释,单次注释,双次取消注释 Ctrl+4 块注释,单次注释,双次取消注释 F5 运行程序 Ctrl+P 文件切换 Ctrl+L 清除shell 阅读全文
posted @ 2020-03-17 15:16 hichens 阅读(837) 评论(0) 推荐(0) 编辑
摘要:接收不定长参数 接受不定长键值对 first normal arg: yasoob another arg through argv: python another arg through argv: eggs another arg through argv: test arg3 == 3 arg 阅读全文
posted @ 2020-02-18 12:23 hichens 阅读(125) 评论(0) 推荐(0) 编辑
摘要:一.为什么要使用Anaconda 学Python的时候, 经常用到的就是import各种包, 开源库的功能真的很强大,用起来真的很香,各种包调来调去省了很多事。最著名的几个库当然是numpy、matplotlib、Tensroflow等等。但是,其缺点也是很明显的,如,各种库经常存在不兼容的问题,库 阅读全文
posted @ 2020-02-04 11:50 hichens 阅读(581) 评论(0) 推荐(1) 编辑
摘要:Sublime 快捷键 多行快速选择文本 Ctrl+D:选中光标所占的文本,继续操作则会选中下一个相同的文本。(非常实用) Ctrl K, Ctrl D:把当前选中所占文本的光标,跳转到下一个相同文本。(配合Ctrl+D很实用) Alt F3:一次性选中(当前选中的文本)相同的文本。等于多次实用Ct 阅读全文
posted @ 2020-02-03 19:10 hichens 阅读(183) 评论(0) 推荐(0) 编辑
摘要:pycharm编辑快捷键 序号 快捷键 作用 1 CTRL + ALT + SPACE 快速导入任意类 2 CTRL + SHIFT + ENTER 代码补全 3 SHIFT + F1 查看外部文档 4 CTRL + Q 快速查找文档 5 CTRL + P 参数信息(在方法中调用的参数) 6 CTR 阅读全文
posted @ 2020-02-03 19:01 hichens 阅读(454) 评论(0) 推荐(0) 编辑

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