网页
综合
更新时间 2026-11-16 08:48:33
Installation — pandas 3.1.1 documentation
自动蜘蛛
pandas.pydata.org
正文约 4577 字
The pandas development team officially distributes pandas for installation through the following methods:
Available on conda-forge for installation with the conda package manager.
Available on PyPI for installation with pip.
Available on Github for installation from source.
pandas may be installable from other sources besides the ones listed above, but they are not managed by the pandas development team.
See Python support policy.
For users working with the Conda package manager, pandas can be installed from the conda-forge channel.
To install the Conda package manager on your system, the Miniforge distribution is recommended.
Additionally, it is recommended to install and run pandas from a virtual environment.
For users that are new to Python, the easiest way to install Python, pandas, and the packages that make up the PyData stack such as SciPy, NumPy and Matplotlib is with Anaconda, a cross-platform (Linux, macOS, Windows) Python distribution for data analytics and scientific computing.
However, pandas from Anaconda is not officially managed by the pandas development team.
For users working with the pip package manager, pandas can be installed 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.
Additionally, it is recommended to install and run pandas from a virtual environment, for example, using the Python standard library’s venv
See the contributing guide for complete instructions on building from the git source tree. Further, see creating a development environment if you wish to create a pandas development environment.
Installing the development version is the quickest way to:
Try a new feature that will be shipped in the next release (that is, a feature from a pull-request that was recently merged to the main branch).
Check whether a bug you encountered has been fixed since the last release.
The development version is usually uploaded daily to the scientific-python-nightly-wheels index from the PyPI registry of anaconda.org. You can install it by running.
You might be required to uninstall an existing version of pandas to install the development version.
If pandas has been installed from source, running pytest pandas will run all of pandas unit tests.
The unit tests can also be run from the pandas module itself with the test() function. The packages required to run the tests can be installed with pip install "pandas[test]".
Test failures are not necessarily indicative of a broken pandas installation.
pandas requires the following dependencies.
Minimum supported version
* tzdata is only required on Windows and Pyodide (Emscripten).
Generally, the minimum supported version is ~2 years old from the release date of a major or minor pandas version.
pandas has many optional dependencies that are only used for specific methods. For example, pandas.read_hdf() requires the pytables package, while DataFrame.to_markdown() requires the tabulate package. If the optional dependency is not installed, pandas will raise an ImportError when the method requiring that dependency is called.
With pip, optional pandas dependencies can be installed or managed in a file (e.g. requirements.txt or pyproject.toml) as optional extras (e.g. pandas[performance, aws]). All optional dependencies can be installed with pandas[all], and specific sets of dependencies are listed in the sections below.
Generally, the minimum supported version is ~1 years old from the release date of a major or minor pandas version. Older versions of optional dependencies may still work, but they are not tested or considered supported.
You are highly encouraged to install these libraries, as they provide speed improvements, especially when working with large data sets.
Installable with pip install "pandas[performance]"
Accelerates certain numerical operations by using multiple cores as well as smart chunking and caching to achieve large speedups
Accelerates certain types of nan by using specialized cython routines to achieve large speedup.
Alternative execution engine for operations that accept engine="numba" using a JIT compiler that translates Python functions to optimized machine code using the LLVM compiler.
Installable with pip install "pandas[plot, output-formatting]".
Conditional formatting with DataFrame.style
Printing in Markdown-friendly format (see tabulate)
Installable with pip install "pandas[computation]".
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。