【脚本语言系列】关于Python数值计算Pandas,你需要知道的事
来源:互联网 发布:qq电脑管家网络加速器 编辑:程序博客网 时间:2024/06/05 15:35
如何使用Pandas
- 安装pandas
- 使用pip安装Pandas或easy_install安装pandas
pip install pandaseasy_install pandas
* 使用源文件进行安装
git clone git://github.com/pydata/pandas.gitcd pandaspython setup.py install
- 用Pandas估计股票收益的相关性
- 创建一个字典对象
data = {}for i in xrange(len(symbols)): data[symbols[i]] = numpy.diff(numpy.log(close[i]))df = pandas.DataFrame(data, index = dates[0][:-1], columns = symbols)
2. 操作DataFrame对象
print df.corr()df.plot()
什么是Pandas
Pandas是Python的一个数据分析库。Pandas和R非常相似,其核心为DataFrame。
0 0
- 【脚本语言系列】关于Python数值计算Pandas,你需要知道的事
- 【脚本语言系列】关于Python数值计算NumPy, 你需要知道的事
- 【脚本语言系列】关于Python系统管理,你需要知道的事
- 【脚本语言系列】关于Python容器,你需要知道的事
- 【脚本语言系列】关于Python调试报错,你需要知道的事
- 【脚本语言系列】关于Python开发环境搭建,你需要知道的事
- 【脚本语言系列】关于Python测试工具lettuce, 你需要知道的事
- 【脚本语言系列】关于Python测试工具mock, 你需要知道的事
- 【脚本语言系列】关于Python测试工具unittest, 你需要知道的事
- 【脚本语言系列】关于Python测试工具docstrings, 你需要知道的事
- 【脚本语言系列】关于Python测试工具Pyflakes, 你需要知道的事
- 【脚本语言系列】关于Python测试工具Pylint, 你需要知道的事
- 【脚本语言系列】关于Python性能分析工具timeit, 你需要知道的事
- 【脚本语言系列】关于Python代码分析工具line_profiler,你需要知道的事
- 【脚本语言系列】关于Python游戏工具Pygame,你需要知道的事
- 【脚本语言系列】关于Python机器学习scikits-learn,你需要知道的事
- 【脚本语言系列】关于Python统计分析statsmodel,你需要知道的事
- 【脚本语言系列】关于Python邮件服务smtplib,你需要知道的事
- R-CNN,SPP-NET, Fast-R-CNN,Faster-R-CNN, YOLO, SSD系列深度学习检测方法梳理
- sqlbulkcopy 批量更新 数据库
- java selenium (二) 环境搭建方法一
- spring boot中关于redis 保存数据的序列化(数据库中的乱码问题)
- Qt 应用获取本机设备IP
- 【脚本语言系列】关于Python数值计算Pandas,你需要知道的事
- 使用Hibernate Criteria实现in子查询和exists子查询
- Hessian解析及应用(整合Spring)
- css3深入理解之border-radius
- java selenium (三) 环境搭建 基于Maven
- 时间复杂度:O(1)、O(n)、O(n²)、O(nlogn)等是什么意思,白话文解释专业术语。
- hive安装
- Android图片轮播控件ConvenientBanner的简单使用
- 从零开始学Makefile(四)