# rename()

*noun*

say it: **“ree-NAYM”** **/riˈneɪm/**

A pandas method that gives a table's columns new names.

## What does **rename()** do in pandas?

**rename()** is the pandas method that hands back a table with new column names. `columns=` takes a dictionary of
old name to new name; columns it doesn't name keep theirs. A report uses it to turn names such as `class_name` into
words people read.

```python
table = by_class.rename(columns={"class_name": "Class", "fee": "Fee", "fill": "Seats filled"})
```

## In a sentence

- “**rename()** turned class_name into Class for the report.”
- “He used **rename()** so the table's headings read as plain words.”

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

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/rename
