语法:
literals包括set literals, directory literals, list literals
大括号包括set/directory
a={}
a={'a','b'}
a={'a': 42,'b':81}
中括号表示list
alist = ['foo', 'bar', 'bar']
empty_list = []
开发环境:
可以用eclipse进行开发
IPython
安装包:
numpy: array 类(实现matrix类的基础)-1.10.4
scipy:数值计算。做矩阵计算,算特征值,算积分,算微分方程。用pip安装的时候一般出现缺少C++包的问题,解决方案请看WinPython
scikit-learn包括朴素贝叶斯
pandas读数据非常快
Matplotlib
方法一WinPython:这个软件包括Ipython, Pandas, Scikit-learn(自然包括numpy, scipy), Python GUI. 或者导入Eclipse,这样在Eclipse也可以用scipy这些包
方法二pip:
python 3.3.以上pip(8.1.1)自带,不需安装只需运行如下:
python -m pip install numpy
python -m pip install scipy
测试:
from numpy import *
from scipy import *
from sklearn import svm
还有一些常用的工具
Orange data mining
Unable to find vcvarsall.bat
python -m pip install -U pip
pip install -U setuptools
pip install -U virtualenv
No comments:
Post a Comment