1、anaconda介绍
Python虽然是一门优秀的程序语言,但其拥有出色的数据处理能力,尤其是在数据量巨大的时候,因而也吸引了不少数据分析人员的关注和使用。Python的数据处理能力主要依赖于NumPy,SciPy,Matplotlib,Pandas这4个库,其中NumPy提供了矩阵运算的功能,SciPy则在NumPy的基础上添加了许多科学计算的函数库,而这两个库就使Python具有和Matlab一样的数据处理能力了。Matplotlib库提供了绘图,可以实现数据的可视化,pandas是基于NumPy的一种工具,该库提供了高效地操作大型数据集所需的工具。而这四个库都需要我们进行单独安装,Python自身并不具备这些库。
一般的Python数据分析教程并不直接在Python shell中运行代码,而是选择了IPython,IPython 是一个 python 的交互式 shell,比传统的Python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数。总而言之,IPython就是各种方便,各种好用!让你自从用了IPython就会嫌弃用Python,就像用了RStudio就不再想用R GUI。
而IPyhon的安装较为麻烦和复杂,一般人很难安装成功,幸好有大神将科学计算所需要的模块以及IPython打包供用户使用,Anaconda就是其中较好的一个。简言之,安装了Anaconda,你就安装了Python+NumPy+SciPy+Matplotlib+IPython+IPython Notebook。所以,我们仅仅安装Anaconda就可以了!
Anaconda的下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
Anaconda的资源包下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
2、anaconda的使用
Anaconda的使用IDE常用的有5种:python、ipython、spyder、ipython qtconsole和ipython notebook。
1) spyder
Editor
|
A powerful editor is a central piece of any good IDE. Spyder's editor has:
- Syntax coloring for Python, C/C++ and Fortran files
- Powerful dynamic code introspection features (powered by rope):
- Code completion and calltips
- Go to an object definition with a mouse click
- Class and function browser.
- Occurrence highlighting.
- To-do lists (TODO, FIXME, XXX).
- Get errors and warnings on the fly (provided by pyflakes)
- Breakpoints and conditional breakpoints to use with the python debugger (pdb).
Learn More |
Console
To easily interact with your code as you progress, Spyder lets you
- Open as many Python and Ipython consoles as you want
- Run a whole script. or any portion of it from the Editor
- Have code completion and automatic link to documentation through the Object Inspector
- Execute all consoles in a separate process so they don't block the application
Learn More |
|
Variable Explorer
|
With the Variable Explorer you can browse and analyze all the results your code is producing, and also
- Edit variables with Spyder's Array Editor, which has support for a lot of data types (numbers, strings, lists, arrays, dictionaries)
|