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

What is Pandas

Pandas is Python's spreadsheet: a tool for loading, cleaning and analysing tables of data with code.

In this page:

  1. What is Pandas

What is Pandas

Pandas is an open-source library for data analysis and manipulation, built on top of NumPy. Its two main structures are the Series (one labelled column) and the DataFrame (a labelled table).

It reads and writes CSV, Excel, JSON, SQL and many other formats.

Note: The name comes from "panel data", an econometrics term for multi-dimensional tables.

Example: What is Pandas

python
import pandas as pd

df = pd.DataFrame({"city": ["Paris", "Tokyo", "Lima"], "population_m": [2.1, 14.0, 10.7]})
print(df)
print(type(df))

# Output:
#     city  population_m
# 0  Paris           2.1
# 1  Tokyo          14.0
# 2   Lima          10.7
# <class 'pandas.core.frame.DataFrame'>
Related Topics
Common Mistakes
  1. Confusing Pandas with the animal-themed unrelated packages
  2. Trying to use it without installing NumPy first
  3. Treating a DataFrame like a plain list of lists
Chapter Summary
  • Pandas analyses tabular data
  • Series is one column, DataFrame is a table
  • It reads many file formats
  • It is built on NumPy
🔒

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.