官术网_书友最值得收藏!

Installing and exploring Pandas

The minimal dependency set requirements for Pandas is given as follows:

  • NumPy: This is the fundamental numerical array package that we installed and covered extensively in the preceding chapters
  • python-dateutil: This is a date handling library
  • pytz: This handles time zone definitions

This list is the bare minimum; a longer list of optional dependencies can be located at http://pandas.pydata.org/pandas-docs/stable/install.html. We can install Pandas via PyPI with pip or easy_install, using a binary installer, with the aid of our operating system package manager, or from the source by checking out the code. The binary installers can be downloaded from http://pandas.pydata.org/getpandas.html.

The command to install Pandas with pip is as follows:

$ pip3 install pandas rpy2

rpy2 is an interface to R and is required because rpy is being deprecated. You may have to prepend the preceding command with sudo if your user account doesn't have sufficient rights.

As we saw in IPython Notebook in Chapter 1, Getting Started with Python Libraries, we can print the version and subpackages of Pandas. The program printed the following output for Pandas:

pandas version 0.19.0
pandas.api
pandas.compat DESCRIPTION compat Cross-compatible functions for Python 2 and 3. Key items to import for 2/3 compatible code: * iterators: range(), map(), 
pandas.computation
pandas.core
pandas.formats
pandas.indexes
pandas.io
pandas.msgpack DESCRIPTION # coding: utf-8 # flake8: noqa PACKAGE CONTENTS _packer _unpacker _version exceptions CLASSES ExtType(builtins.tuple) ExtType cl 
pandas.rpy DESCRIPTION # GH9602 # deprecate rpy to instead directly use rpy2 PACKAGE CONTENTS base common mass vars FILE /usr/local/lib/python3.5/site- 
pandas.sparse
pandas.stats
pandas.tests
pandas.tools
pandas.tseries
pandas.types
pandas.util

Unfortunately, the documentation of the Pandas subpackages lacks informative descriptions; however, the subpackage names are descriptive enough for us to get an idea of what they are about.

主站蜘蛛池模板: 长葛市| 涟源市| 碌曲县| 苍梧县| 湘西| 嘉祥县| 隆安县| 聂荣县| 文水县| 望江县| 微山县| 林西县| 敖汉旗| 滦南县| 香港 | 文登市| 翁源县| 尚义县| 南投市| 广昌县| 乌兰浩特市| 潜山县| 东源县| 荣昌县| 当雄县| 武清区| 基隆市| 乌苏市| 察雅县| 布拖县| 花垣县| 礼泉县| 营口市| 武汉市| 土默特右旗| 游戏| 乃东县| 米泉市| 新河县| 上思县| 吉安县|