Open a CSV in Pandas.
Run:
df.info()
You'll often notice many text columns have the type:
object
If a column contains repeated values like:
London
London
London
Paris
Paris
Berlin
convert it to:
category
Instead of storing the full text every time, Pandas stores each unique value once and references it internally.
On large datasets, memory usage can drop dramatically.