包:
python也有非常多的扩展包,不过用于数据分析的并不象R那么品种繁多。常用的:
numpy:提供最基本的数值计算,使向量化计算成为可能。
scipy:提供了包括最优化在内的科学计算函数,不用自己写啦。
pandas:提供了类似dataframe的数据结构,处理表格数据非常方便。
matplotlib:画图必备,但用起来感觉不如ggplot2啊。
statsmodel:提供包括回归、检验等多种统计分析函数,python也能干R的活。
sklearn:数据挖掘必备,各种函数非常丰富,文档齐全,看得出CS出品就是不一样啊。
书:
python的数据方面书还不算很多,不过很有CS的味道,就是用show me the code,公式不多,这点我很喜欢。
现有可以找到的书基本上分为三类,一类是用基本语法实现统计分析和科学计算,例如下面的:
Think Stats
Think Bayes
Numerical Python
A Primer on Scientific Programming with Python
另一类是以介绍一些包为目的,带有一些案例,例如:
Introduction to Python for Econometrics, Statistics and Data Analysis
numpy begin guide
Python for Data Analysis
matplotlib cookbook
Learning scikit learn Machine Learning
python text processing with nltk 2.0 cookbook
Social Network Analysis for Startups
最后一类是专门讲数据挖掘、机器学习的书:
下面五本书都是讲如何用基本语料来实现机器学习算法的,非常有帮助
机器学习实战
集体智慧编程
Data Science from Scratch
Machine Learning in Python
Machine Learning An Algorithmic Perspective
下面三本都是应用了成熟的机器学习库
Building Machine Learning Systems with Python
mastering machine learning with scikit-learn
scikit-learn Cookbook
《数据挖掘导论》 作者:pang-Ning Tan
《统计学习方法》 李航
《The Elements of Statistical Learning》
吴恩达在cousera上的公开课
林轩田在cousera上的公开课
python的一大妙处就是ipython notebook,它可以把代码及其结果都存在一个网页上,方便分享学习。网上有非常多的notebook,其中成体系而又精彩的有下面三个:
https://github.com/datadave/GADS9-NYC-Spring2014-Lectures
http://blog.yhathq.com/posts/data-science-in-python-tutorial.html
http://slendermeans.org/pages/will-it-python.html
更多资源,请参见github上的一个列表
https://github.com/jonathan-bower/DataScienceResources
have fun!