Python Pandas 简明教程

Python Pandas - Environment Setup

标准 Python 发行版不附带 Pandas 模块。一种轻量级替代方法是使用流行的 Python 软件包安装程序 pip. 安装 NumPy。

Standard Python distribution doesn’t come bundled with Pandas module. A lightweight alternative is to install NumPy using popular Python package installer, pip.

pip install pandas

如果安装 Anaconda Python 软件包,则 Pandas 将默认安装为以下形式 −

If you install Anaconda Python package, Pandas will be installed by default with the following −

Windows

  1. Anaconda (from https://www.continuum.io) is a free Python distribution for SciPy stack. It is also available for Linux and Mac.

  2. Canopy (https://www.enthought.com/products/canopy/) is available as free as well as commercial distribution with full SciPy stack for Windows, Linux and Mac.

  3. Python (x,y) is a free Python distribution with SciPy stack and Spyder IDE for Windows OS. (Downloadable from http://python-xy.github.io/)

Linux

各个 Linux 发行版的包管理器用于安装 SciPy 堆栈中的一个或多个包。

Package managers of respective Linux distributions are used to install one or more packages in SciPy stack.

For Ubuntu Users

For Ubuntu Users

sudo apt-get install python-numpy python-scipy python-matplotlibipythonipythonnotebook
python-pandas python-sympy python-nose

For Fedora Users

For Fedora Users

sudo yum install numpyscipy python-matplotlibipython python-pandas sympy
python-nose atlas-devel