Pip install python pandas

Installation#

The easiest way to install pandas is to install it as part of the Anaconda distribution, a cross platform distribution for data analysis and scientific computing. This is the recommended installation method for most users.

Instructions for installing from source, PyPI, ActivePython, various Linux distributions, or a development version are also provided.

Python version support#

Officially Python 3.8, 3.9, 3.10 and 3.11.

Installing pandas#

Installing with Anaconda#

Installing pandas and the rest of the NumPy and SciPy stack can be a little difficult for inexperienced users.

The simplest way to install not only pandas, but Python and the most popular packages that make up the SciPy stack (IPython, NumPy, Matplotlib, …) is with Anaconda, a cross-platform (Linux, macOS, Windows) Python distribution for data analytics and scientific computing.

After running the installer, the user will have access to pandas and the rest of the SciPy stack without needing to install anything else, and without needing to wait for any software to be compiled.

Installation instructions for Anaconda can be found here.

A full list of the packages available as part of the Anaconda distribution can be found here.

Another advantage to installing Anaconda is that you don’t need admin rights to install it. Anaconda can install in the user’s home directory, which makes it trivial to delete Anaconda if you decide (just delete that folder).

Installing with Miniconda#

The previous section outlined how to get pandas installed as part of the Anaconda distribution. However this approach means you will install well over one hundred packages and involves downloading the installer which is a few hundred megabytes in size.

If you want to have more control on which packages, or have a limited internet bandwidth, then installing pandas with Miniconda may be a better solution.

Conda is the package manager that the Anaconda distribution is built upon. It is a package manager that is both cross-platform and language agnostic (it can play a similar role to a pip and virtualenv combination).

Miniconda allows you to create a minimal self contained Python installation, and then use the Conda command to install additional packages.

First you will need Conda to be installed and downloading and running the Miniconda will do this for you. The installer can be found here

The next step is to create a new conda environment. A conda environment is like a virtualenv that allows you to specify a specific version of Python and set of libraries. Run the following commands from a terminal window:

conda create -n name_of_my_env python 

This will create a minimal environment with only Python installed in it. To put your self inside this environment run:

source activate name_of_my_env 

On Windows the command is:

Читайте также:  Javascript lastindexof in string

The final step required is to install pandas. This can be done with the following command:

To install a specific pandas version:

To install other packages, IPython for example:

To install the full Anaconda distribution:

If you need packages that are available to pip but not conda, then install pip, and then use pip to install those packages:

conda install pip pip install django 

Installing from PyPI#

pandas can be installed via pip from PyPI.

You must have pip>=19.3 to install from PyPI.

pandas can also be installed with sets of optional dependencies to enable certain functionality. For example, to install pandas with the optional dependencies to read Excel files.

The full list of extras that can be installed can be found in the dependency section.

Installing with ActivePython#

Installation instructions for ActivePython can be found here. Versions 2.7, 3.5 and 3.6 include pandas.

Installing using your Linux distribution’s package manager.#

The commands in this table will install pandas for Python 3 from your distribution.

Download / Repository Link

Источник

Installation#

The easiest way to install pandas is to install it as part of the Anaconda distribution, a cross platform distribution for data analysis and scientific computing. This is the recommended installation method for most users.

Instructions for installing from source, PyPI, ActivePython, various Linux distributions, or a development version are also provided.

Python version support#

Officially Python 3.8, 3.9, 3.10 and 3.11.

Installing pandas#

Installing with Anaconda#

Installing pandas and the rest of the NumPy and SciPy stack can be a little difficult for inexperienced users.

The simplest way to install not only pandas, but Python and the most popular packages that make up the SciPy stack (IPython, NumPy, Matplotlib, …) is with Anaconda, a cross-platform (Linux, macOS, Windows) Python distribution for data analytics and scientific computing.

After running the installer, the user will have access to pandas and the rest of the SciPy stack without needing to install anything else, and without needing to wait for any software to be compiled.

Installation instructions for Anaconda can be found here.

A full list of the packages available as part of the Anaconda distribution can be found here.

Another advantage to installing Anaconda is that you don’t need admin rights to install it. Anaconda can install in the user’s home directory, which makes it trivial to delete Anaconda if you decide (just delete that folder).

Installing with Miniconda#

The previous section outlined how to get pandas installed as part of the Anaconda distribution. However this approach means you will install well over one hundred packages and involves downloading the installer which is a few hundred megabytes in size.

If you want to have more control on which packages, or have a limited internet bandwidth, then installing pandas with Miniconda may be a better solution.

Conda is the package manager that the Anaconda distribution is built upon. It is a package manager that is both cross-platform and language agnostic (it can play a similar role to a pip and virtualenv combination).

Читайте также:  Переопределение tostring java массив

Miniconda allows you to create a minimal self contained Python installation, and then use the Conda command to install additional packages.

First you will need Conda to be installed and downloading and running the Miniconda will do this for you. The installer can be found here

The next step is to create a new conda environment. A conda environment is like a virtualenv that allows you to specify a specific version of Python and set of libraries. Run the following commands from a terminal window:

conda create -n name_of_my_env python 

This will create a minimal environment with only Python installed in it. To put your self inside this environment run:

source activate name_of_my_env 

On Windows the command is:

The final step required is to install pandas. This can be done with the following command:

To install a specific pandas version:

To install other packages, IPython for example:

To install the full Anaconda distribution:

If you need packages that are available to pip but not conda, then install pip, and then use pip to install those packages:

conda install pip pip install django 

Installing from PyPI#

pandas can be installed via pip from PyPI.

You must have pip>=19.3 to install from PyPI.

pandas can also be installed with sets of optional dependencies to enable certain functionality. For example, to install pandas with the optional dependencies to read Excel files.

The full list of extras that can be installed can be found in the dependency section.

Installing with ActivePython#

Installation instructions for ActivePython can be found here. Versions 2.7, 3.5 and 3.6 include pandas.

Installing using your Linux distribution’s package manager.#

The commands in this table will install pandas for Python 3 from your distribution.

Download / Repository Link

Источник

pandas: powerful Python data analysis toolkit

pandas is a Python package that provides fast, flexible, and expressive data structures designed to make working with «relational» or «labeled» data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open source data analysis / manipulation tool available in any language. It is already well on its way towards this goal.

Main Features

Here are just a few of the things that pandas does well:

  • Easy handling of missing data (represented as NaN , NA , or NaT ) in floating point as well as non-floating point data
  • Size mutability: columns can be inserted and deleted from DataFrame and higher dimensional objects
  • Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let Series , DataFrame , etc. automatically align the data for you in computations
  • Powerful, flexible group by functionality to perform split-apply-combine operations on data sets, for both aggregating and transforming data
  • Make it easy to convert ragged, differently-indexed data in other Python and NumPy data structures into DataFrame objects
  • Intelligent label-based slicing, fancy indexing, and subsetting of large data sets
  • Intuitive merging and joining data sets
  • Flexible reshaping and pivoting of data sets
  • Hierarchical labeling of axes (possible to have multiple labels per tick)
  • Robust IO tools for loading data from flat files (CSV and delimited), Excel files, databases, and saving/loading data from the ultrafast HDF5 format
  • Time series-specific functionality: date range generation and frequency conversion, moving window statistics, date shifting and lagging
Читайте также:  Unzipping a file in python

Where to get it

The source code is currently hosted on GitHub at: https://github.com/pandas-dev/pandas

Binary installers for the latest released version are available at the Python Package Index (PyPI) and on Conda.

Dependencies

See the full installation instructions for minimum supported versions of required, recommended and optional dependencies.

Installation from sources

To install pandas from source you need Cython in addition to the normal dependencies above. Cython can be installed from PyPI:

In the pandas directory (same one where you found this file after cloning the git repo), execute:

python -m pip install -e . --no-build-isolation --no-use-pep517

See the full instructions for installing from source.

License

Documentation

The official documentation is hosted on PyData.org: https://pandas.pydata.org/pandas-docs/stable

Background

Work on pandas started at AQR (a quantitative hedge fund) in 2008 and has been under active development since then.

Getting Help

For usage questions, the best place to go to is StackOverflow. Further, general questions and discussions can also take place on the pydata mailing list.

Discussion and Development

Most development discussions take place on GitHub in this repo. Further, the pandas-dev mailing list can also be used for specialized discussions or design issues, and a Slack channel is available for quick development related questions.

Contributing to pandas

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

A detailed overview on how to contribute can be found in the contributing guide.

If you are simply looking to start working with the pandas codebase, navigate to the GitHub «issues» tab and start looking through interesting issues. There are a number of issues listed under Docs and good first issue where you could start out.

You can also triage issues which may include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to subscribe to pandas on CodeTriage.

Or maybe through using pandas you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’. you can do something about it!

Feel free to ask questions on the mailing list or on Slack.

As contributors and maintainers to this project, you are expected to abide by pandas’ code of conduct. More information can be found at: Contributor Code of Conduct

Источник

Оцените статью