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

Python libraries in data analysis

Python is a multi-platform, general-purpose programming language that can run on Windows, Linux/Unix, and Mac OS X, and has been ported to Java and .NET virtual machines as well. It has a powerful standard library. In addition, it has many libraries for data analysis: Pylearn2, Hebel, Pybrain, Pattern, MontePython, and MILK. In this book, we will cover some common Python data analysis libraries such as Numpy, Pandas, Matplotlib, PyMongo, and scikit-learn. Now, to help you get started, I will briefly present an overview of each library for those who are less familiar with the scientific Python stack.

NumPy

One of the fundamental packages used for scientific computing in Python is Numpy. Among other things, it contains the following:

  • A powerful N-dimensional array object
  • Sophisticated (broadcasting) functions for performing array computations
  • Tools for integrating C/C++ and Fortran code
  • Useful linear algebra operations, Fourier transformations, and random number capabilities

Besides this, it can also be used as an efficient multidimensional container of generic data. Arbitrary data types can be defined and integrated with a wide variety of databases.

Pandas

Pandas is a Python package that supports rich data structures and functions for analyzing data, and is developed by the PyData Development Team. It is focused on the improvement of Python's data libraries. Pandas consists of the following things:

  • A set of labeled array data structures; the primary of which are Series, DataFrame, and Panel
  • Index objects enabling both simple axis indexing and multilevel/hierarchical axis indexing
  • An intergraded group by engine for aggregating and transforming datasets
  • Date range generation and custom date offsets
  • Input/output tools that load and save data from flat files or PyTables/HDF5 format
  • Optimal memory versions of the standard data structures
  • Moving window statistics and static and moving window linear/panel regression

Due to these features, Pandas is an ideal tool for systems that need complex data structures or high-performance time series functions such as financial data analysis applications.

Matplotlib

Matplotlib is the single most used Python package for 2D-graphics. It provides both a very quick way to visualize data from Python and publication-quality figures in many formats: line plots, contour plots, scatter plots, and Basemap plots. It comes with a set of default settings, but allows customization of all kinds of properties. However, we can easily create our chart with the defaults of almost every property in Matplotlib.

PyMongo

MongoDB is a type of NoSQL database. It is highly scalable, robust, and perfect to work with JavaScript-based web applications, because we can store data as JSON documents and use flexible schemas.

PyMongo is a Python distribution containing tools for working with MongoDB. Many tools have also been written for working with PyMongo to add more features such as MongoKit, Humongolus, MongoAlchemy, and Ming.

The scikit-learn library

The scikit-learn is an open source machine-learning library using the Python programming language. It supports various machine learning models, such as classification, regression, and clustering algorithms, interoperated with the Python numerical and scientific libraries NumPy and SciPy. The latest scikit-learn version is 0.16.1, published in April 2015.

主站蜘蛛池模板: 杭锦后旗| 扶绥县| 宜良县| 甘德县| 玛多县| 江北区| 寿宁县| 平阴县| 光山县| 常州市| 东莞市| 枣庄市| 基隆市| 枞阳县| 健康| 贵定县| 梓潼县| 宾阳县| 白水县| 祥云县| 滦平县| 平原县| 龙胜| 西昌市| 牡丹江市| 延川县| 九江县| 柞水县| 平利县| 英山县| 百色市| 堆龙德庆县| 东丽区| 扬州市| 济源市| 泗水县| 留坝县| 伊宁县| 顺平县| 乌审旗| 施甸县|