numpy模块 numpy数组(矩阵)的运算, 科学运算, tensorflow pandas模块 文件(excel)的处理 read_excel()/to_excel() matplotlib模块 画图, plt.plot()/plt.bar()/plt.scatter()/plt.hist()/ ...
分类:
其他好文 时间:
2019-09-12 21:31:28
阅读次数:
99
import pandas as pd #自己创建一个df df = pd.DataFrame({ 'col1':[0,1,2], 'col2':["zs",'li','zl'], 'col3':[3.14,5.20,6.78] }, index=['index0','index1','index2... ...
分类:
其他好文 时间:
2019-09-11 21:44:12
阅读次数:
97
import numpy as np import pandas as pd # pandas 主要是用来进行数据处理的库, # 里面不仅包含了数据处理、甚至还有 统计分析、相关计算,其内部封装了numpy 相关组件 # numpy 核心 ---多维数组-ndarray # pandas 要做数据处... ...
分类:
其他好文 时间:
2019-09-11 21:42:53
阅读次数:
64
pandas用法总结 2018年06月07日 10:49:03 一夜了 阅读数 38705更多 分类专栏: 杂项 2018年06月07日 10:49:03 一夜了 阅读数 38705更多 分类专栏: 杂项 分类专栏: 杂项 一、生成数据表 1、首先导入pandas库,一般都会用到numpy库,所以我 ...
分类:
其他好文 时间:
2019-09-11 13:44:39
阅读次数:
93
本文主要讨论的是通过爬取天猫的销售数据和评论数据后,对数据进行清洗,并进行分析。流程大致为:1.通过selenium爬取销售数据; 2.通过selenium和re正则表达式爬取评论数据;3.通过pandas对数据进行清洗和分析;4.运用matplotlib和wordcount来进行可视化 1、故事的 ...
分类:
编程语言 时间:
2019-09-10 23:55:18
阅读次数:
212
1、添加列(合并列) (1)、join 直接用index来连接,即对应index的行连接起来,形成添加新列的效果,但是要有一样的index且不能有重叠的列(列标签也不能重叠)。 (2)、assign 相当于date1['three'] = range(5),区别是这种方法会修改原对象,而用assig ...
分类:
其他好文 时间:
2019-09-10 23:34:33
阅读次数:
108
assign是直接向DataFrame对象添加新的一列 示例: 结果: 添加的列名不能用字符串表示 ...
分类:
其他好文 时间:
2019-09-10 20:46:39
阅读次数:
497
这个函数用于设置dataframe的输出显示, import pandas as ps pd.set_option('expand_frame_repr', True) # True就是可以换行显示。设置成False的时候不允许换行 pd.set_option('display.max_rows', ...
分类:
其他好文 时间:
2019-09-09 15:03:28
阅读次数:
3809
一.生成数据表 1.首先导入pandas库,一般都会用到numpy库,先导备用: 3.用pandas创建数据表 1 2 3 4 5 6 7 1 2 3 4 5 6 7 二.数据表信息查看 1.维度查看: 2.数据表基本信息(维度.列名称.数据格式.所占空间等) 3、每一列数据的格式: ? data. ...
分类:
其他好文 时间:
2019-09-08 20:02:39
阅读次数:
97