@@ -139,6 +139,16 @@ pandas can be installed via pip from
139
139
140
140
pip install pandas
141
141
142
+ pandas can also be installed with sets of optional dependencies to enable certain functionality. For example,
143
+ to install pandas with the optional dependencies to read Excel files.
144
+
145
+ ::
146
+
147
+ pip install "pandas[excel]"
148
+
149
+
150
+ The full list of extras that can be installed can be found in the :ref: `dependency section.<install.optional_dependencies> `
151
+
142
152
Installing with ActivePython
143
153
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144
154
@@ -232,6 +242,13 @@ This is just an example of what information is shown. You might see a slightly d
232
242
Dependencies
233
243
------------
234
244
245
+ .. _install.required_dependencies :
246
+
247
+ Required dependencies
248
+ ~~~~~~~~~~~~~~~~~~~~~
249
+
250
+ pandas requires the following dependencies.
251
+
235
252
================================================================ ==========================
236
253
Package Minimum supported version
237
254
================================================================ ==========================
@@ -240,56 +257,48 @@ Package Minimum support
240
257
`pytz <https://pypi.org/project/pytz/ >`__ 2020.1
241
258
================================================================ ==========================
242
259
243
- .. _install.recommended_dependencies :
260
+ .. _install.optional_dependencies :
244
261
245
- Performance dependencies (recommended)
246
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262
+ Optional dependencies
263
+ ~~~~~~~~~~~~~~~~~~~~~
247
264
248
- pandas recommends the following optional dependencies for performance gains. These dependencies can be specifically
249
- installed with ``pandas[performance] `` (i.e. add as optional_extra to the pandas requirement)
265
+ pandas has many optional dependencies that are only used for specific methods.
266
+ For example, :func: `pandas.read_hdf ` requires the ``pytables `` package, while
267
+ :meth: `DataFrame.to_markdown ` requires the ``tabulate `` package. If the
268
+ optional dependency is not installed, pandas will raise an ``ImportError `` when
269
+ the method requiring that dependency is called.
250
270
251
- * ` numexpr < https://github.com/pydata/numexpr >`__: for accelerating certain numerical operations.
252
- `` numexpr `` uses multiple cores as well as smart chunking and caching to achieve large speedups.
253
- If installed, must be Version 2.7.3 or higher .
271
+ If using pip, optional pandas dependencies can be installed or managed in a file (e.g. requirements.txt or pyproject.toml)
272
+ as optional extras (e.g.,``pandas[performance, aws]>=1.5.0``). All optional dependencies can be installed with `` pandas[all] ``,
273
+ and specific sets of dependencies are listed in the sections below .
254
274
255
- * `bottleneck <https://github.com/pydata/bottleneck >`__: for accelerating certain types of ``nan ``
256
- evaluations. ``bottleneck `` uses specialized cython routines to achieve large speedups. If installed,
257
- must be Version 1.3.2 or higher.
275
+ .. _install.recommended_dependencies :
258
276
259
- * `numba <https://github.com/numba/numba >`__: alternative execution engine for operations that accept `engine="numba"
260
- argument (eg. apply). ``numba`` is a JIT compiler that translates Python functions to optimized machine code using
261
- the LLVM compiler library. If installed, must be Version 0.53.1 or higher.
277
+ Performance dependencies (recommended)
278
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262
279
263
280
.. note ::
264
281
265
282
You are highly encouraged to install these libraries, as they provide speed improvements, especially
266
283
when working with large data sets.
267
284
285
+ Installable with ``pip install "pandas[performance]" ``
268
286
269
- .. _install.optional_dependencies :
270
-
271
- Optional dependencies
272
- ~~~~~~~~~~~~~~~~~~~~~
273
-
274
- pandas has many optional dependencies that are only used for specific methods.
275
- For example, :func: `pandas.read_hdf ` requires the ``pytables `` package, while
276
- :meth: `DataFrame.to_markdown ` requires the ``tabulate `` package. If the
277
- optional dependency is not installed, pandas will raise an ``ImportError `` when
278
- the method requiring that dependency is called.
279
-
280
- Optional pandas dependencies can be managed as optional extras (e.g.,``pandas[performance, aws]>=1.5.0``)
281
- in a requirements.txt, setup, or pyproject.toml file.
282
- Available optional dependencies are ``[all, performance, computation, aws,
283
- gcp, excel, parquet, feather, hdf5, spss, postgresql, mysql, sql-other, html, xml,
284
- plot, output_formatting, compression, test] ``
287
+ ===================================================== ================== ================== ===================================================================================================================================================================================
288
+ Dependency Minimum Version pip extra Notes
289
+ ===================================================== ================== ================== ===================================================================================================================================================================================
290
+ `numexpr <https://github.com/pydata/numexpr >`__ 2.7.3 performance Accelerates certain numerical operations by using uses multiple cores as well as smart chunking and caching to achieve large speedups
291
+ `bottleneck <https://github.com/pydata/bottleneck >`__ 1.3.2 performance Accelerates certain types of ``nan `` by using specialized cython routines to achieve large speedup.
292
+ `numba <https://github.com/numba/numba >`__ 0.53.1 performance 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.
293
+ ===================================================== ================== ================== ===================================================================================================================================================================================
285
294
286
295
Timezones
287
296
^^^^^^^^^
288
297
289
- Can be managed as optional_extra with ``pandas[timezone] ``.
298
+ Installable with ``pip install " pandas[timezone]" ``
290
299
291
300
========================= ========================= =============== =============================================================
292
- Dependency Minimum Version optional_extra Notes
301
+ Dependency Minimum Version pip extra Notes
293
302
========================= ========================= =============== =============================================================
294
303
tzdata 2022.1(pypi)/ timezone Allows the use of ``zoneinfo `` timezones with pandas.
295
304
2022a(for system tzdata) **Note **: You only need to install the pypi package if your
@@ -305,10 +314,10 @@ tzdata 2022.1(pypi)/ timezone Allows the u
305
314
Visualization
306
315
^^^^^^^^^^^^^
307
316
308
- Can be managed as optional_extra with ``pandas[plot, output_formatting] ``, depending on the required functionality .
317
+ Installable with ``pip install " pandas[plot, output_formatting]" `` .
309
318
310
319
========================= ================== ================== =============================================================
311
- Dependency Minimum Version optional_extra Notes
320
+ Dependency Minimum Version pip extra Notes
312
321
========================= ================== ================== =============================================================
313
322
matplotlib 3.6.1 plot Plotting library
314
323
Jinja2 3.0.0 output_formatting Conditional formatting with DataFrame.style
@@ -318,10 +327,10 @@ tabulate 0.8.9 output_formatting Printing in Mark
318
327
Computation
319
328
^^^^^^^^^^^
320
329
321
- Can be managed as optional_extra with ``pandas[computation] ``.
330
+ Installable with ``pip install " pandas[computation]" ``.
322
331
323
332
========================= ================== =============== =============================================================
324
- Dependency Minimum Version optional_extra Notes
333
+ Dependency Minimum Version pip extra Notes
325
334
========================= ================== =============== =============================================================
326
335
SciPy 1.7.1 computation Miscellaneous statistical functions
327
336
xarray 0.19.0 computation pandas-like API for N-dimensional data
@@ -330,10 +339,10 @@ xarray 0.19.0 computation pandas-like API for
330
339
Excel files
331
340
^^^^^^^^^^^
332
341
333
- Can be managed as optional_extra with ``pandas[excel] ``.
342
+ Installable with ``pip install " pandas[excel]" ``.
334
343
335
344
========================= ================== =============== =============================================================
336
- Dependency Minimum Version optional_extra Notes
345
+ Dependency Minimum Version pip extra Notes
337
346
========================= ================== =============== =============================================================
338
347
xlrd 2.0.1 excel Reading Excel
339
348
xlsxwriter 1.4.3 excel Writing Excel
@@ -344,10 +353,10 @@ pyxlsb 1.0.8 excel Reading for xlsb fi
344
353
HTML
345
354
^^^^
346
355
347
- These dependencies can be specifically installed with ``pandas[html] ``.
356
+ Installable with ``pip install " pandas[html]" ``.
348
357
349
358
========================= ================== =============== =============================================================
350
- Dependency Minimum Version optional_extra Notes
359
+ Dependency Minimum Version pip extra Notes
351
360
========================= ================== =============== =============================================================
352
361
BeautifulSoup4 4.9.3 html HTML parser for read_html
353
362
html5lib 1.1 html HTML parser for read_html
@@ -381,22 +390,21 @@ top-level :func:`~pandas.read_html` function:
381
390
XML
382
391
^^^
383
392
384
- Can be managed as optional_extra with ``pandas[xml] ``.
393
+ Installable with ``pip install " pandas[xml]" ``.
385
394
386
395
========================= ================== =============== =============================================================
387
- Dependency Minimum Version optional_extra Notes
396
+ Dependency Minimum Version pip extra Notes
388
397
========================= ================== =============== =============================================================
389
398
lxml 4.6.3 xml XML parser for read_xml and tree builder for to_xml
390
399
========================= ================== =============== =============================================================
391
400
392
401
SQL databases
393
402
^^^^^^^^^^^^^
394
403
395
- Can be managed as optional_extra with ``pandas[postgresql, mysql, sql-other] ``,
396
- depending on required sql compatibility.
404
+ Installable with ``pip install "pandas[postgresql, mysql, sql-other]" ``.
397
405
398
406
========================= ================== =============== =============================================================
399
- Dependency Minimum Version optional_extra Notes
407
+ Dependency Minimum Version pip extra Notes
400
408
========================= ================== =============== =============================================================
401
409
SQLAlchemy 1.4.16 postgresql, SQL support for databases other than sqlite
402
410
mysql,
@@ -408,11 +416,10 @@ pymysql 1.0.2 mysql MySQL engine for sq
408
416
Other data sources
409
417
^^^^^^^^^^^^^^^^^^
410
418
411
- Can be managed as optional_extra with ``pandas[hdf5, parquet, feather, spss, excel] ``,
412
- depending on required compatibility.
419
+ Installable with ``pip install "pandas[hdf5, parquet, feather, spss, excel]" ``
413
420
414
421
========================= ================== ================ =============================================================
415
- Dependency Minimum Version optional_extra Notes
422
+ Dependency Minimum Version pip extra Notes
416
423
========================= ================== ================ =============================================================
417
424
PyTables 3.6.1 hdf5 HDF5-based reading / writing
418
425
blosc 1.21.0 hdf5 Compression for HDF5; only available on ``conda ``
@@ -441,10 +448,10 @@ odfpy 1.4.1 excel Open document form
441
448
Access data in the cloud
442
449
^^^^^^^^^^^^^^^^^^^^^^^^
443
450
444
- Can be managed as optional_extra with ``pandas[fss, aws, gcp] ``, depending on required compatibility.
451
+ Installable with ``pip install " pandas[fss, aws, gcp]" ``
445
452
446
453
========================= ================== =============== =============================================================
447
- Dependency Minimum Version optional_extra Notes
454
+ Dependency Minimum Version pip extra Notes
448
455
========================= ================== =============== =============================================================
449
456
fsspec 2021.7.0 fss, gcp, aws Handling files aside from simple local and HTTP (required
450
457
dependency of s3fs, gcsfs).
@@ -456,29 +463,28 @@ s3fs 2021.08.0 aws Amazon S3 access
456
463
Clipboard
457
464
^^^^^^^^^
458
465
459
- Can be managed as optional_extra with ``pandas[clipboard] ``. However, depending on operating system, system-level
460
- packages may need to installed.
466
+ Installable with ``pip install "pandas[clipboard]" ``.
461
467
462
468
========================= ================== =============== =============================================================
463
- Dependency Minimum Version optional_extra Notes
469
+ Dependency Minimum Version pip extra Notes
464
470
========================= ================== =============== =============================================================
465
- PyQt4/PyQt5 5.15.1 Clipboard I/O
466
- qtpy 2.2.0 Clipboard I/O
471
+ PyQt4/PyQt5 5.15.1 clipboard Clipboard I/O
472
+ qtpy 2.2.0 clipboard Clipboard I/O
467
473
========================= ================== =============== =============================================================
468
474
469
475
.. note ::
470
476
477
+ Depending on operating system, system-level packages may need to installed.
471
478
For clipboard to operate on Linux one of the CLI tools ``xclip `` or ``xsel `` must be installed on your system.
472
479
473
480
474
481
Compression
475
482
^^^^^^^^^^^
476
483
477
- Can be managed as optional_extra with ``pandas[compression] ``.
478
- If only one specific compression lib is required, please request it as an independent requirement.
484
+ Installable with ``pip install "pandas[compression]" ``
479
485
480
486
========================= ================== =============== =============================================================
481
- Dependency Minimum Version optional_extra Notes
487
+ Dependency Minimum Version pip extra Notes
482
488
========================= ================== =============== =============================================================
483
489
brotli 0.7.0 compression Brotli compression
484
490
python-snappy 0.6.0 compression Snappy compression
0 commit comments