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

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.

主站蜘蛛池模板: 玉田县| 渑池县| 手机| 策勒县| 鄄城县| 旺苍县| 本溪市| 宜黄县| 荆州市| 建瓯市| 厦门市| 息烽县| 临桂县| 民县| 安顺市| 大名县| 宁乡县| 定日县| 益阳市| 友谊县| 库车县| 大兴区| 绵阳市| 宽城| 平凉市| 平乡县| 政和县| 抚州市| 招远市| 资兴市| 成都市| 建瓯市| 沿河| 广河县| 恩平市| 靖安县| 祁阳县| 延庆县| 慈溪市| 香格里拉县| 沙坪坝区|