Installing Pandas
Installing Pandas means downloading it once with pip so any Python program can import it.
In this page:
Installing Pandas
Pandas installs with pip and pulls in NumPy automatically. Always work inside a virtual environment so versions do not clash between projects. Afterwards, print the version to confirm the installation.
Note:
In a Jupyter notebook you can run
!pip install pandas in a cell.Example: Installing Pandas
$ python -m venv venv
$ source venv/bin/activate
$ python -m pip install pandas
Successfully installed numpy-1.26.4 pandas-2.2.2 python-dateutil-2.9.0 pytz-2024.1
$ python -c "import pandas as pd; print(pd.__version__)"
2.2.2
⚠️ Run this in your own terminal or Node.js environment.
Related Topics
Common Mistakes
- Installing into a different Python than the one you run
- Not using a virtual environment
- Naming your script pandas.py
Chapter Summary
- pip install pandas
- NumPy is installed as a dependency
- Check pd.__version__
- Conda users: conda install pandas
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: