# Index

*noun*

say it: **“IN-deks”** **/ˈɪndɛks/**

In pandas, the labels that name each row of a table or each value of a column, used to find them; by default they are numbers counting up from 0.

## What is the **index** of a pandas table?

The **index** is the labels of a pandas Series or DataFrame: one for each value or row, shown down the left side,
used to find them. Without labels of your own, pandas numbers the rows from 0; you can give it names instead, such as
products.

```python
import pandas as pd
units = pd.Series([21, 20, 36], index=["lettuce", "honey jar", "sourdough loaf"])
print(units["honey jar"])    # 20
```

## In a sentence

- “The **index** ran from 0 to 5, one label for each sale.”
- “With products as the **index**, she could look up the honey jar's units by name.”

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 19, 2026

## In other subjects

- [Index in Database](https://www.ask-codey.com/glossary/index)
- [Index in Git](https://www.ask-codey.com/glossary/index-git)

Source: https://www.ask-codey.com/glossary/index-python
