← Back to Pandas Course | Chapter 1: Getting Started | Lesson 2 of 7

Installing Pandas

Installing Pandas means downloading it once with pip so any Python program can import it.

In this page:

  1. Installing Pandas

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

bash
$ 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
  1. Installing into a different Python than the one you run
  2. Not using a virtual environment
  3. 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:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.