An import job can run out of memory before it finishes converting strings. Start by measuring the column you already have and a candidate representation on the same values. The example below requires pandas and PyArrow. It deliberately includes repeated text, longer text and a missing value.
What Arrow Backing Does to Memory
import pandas as pd
import pyarrow as pa
labels = ["west", "east", None, "warehouse-0001"] * 2000
python_text = pd.Series(labels, dtype="string[python]")
arrow_text = pd.Series(labels, dtype="string[pyarrow]")
pd.testing.assert_series_equal(python_text, arrow_text.astype("string[python]"))
print(pd.__version__, pa.__version__)
for label, series in [("Python", python_text), ("Arrow", arrow_text)]:
print(label, series.memory_usage(index=False, deep=True))
Arrow uses column buffers for strings and tracks nulls separately. The byte count above describes these particular columns. It excludes process overhead and the temporary peak while both copies exist. Try different string lengths and cardinalities, then run the operation the job does next. In pandas 3.0, inferred text uses the new string dtype even without PyArrow. Its storage depends on which libraries are installed. pandas text data
I/O Is Where It Wins Big
A CSV parser reads delimited text. An Arrow-backed result is a choice about the representation after parsing. Measure parser and result backend separately. Parquet stores encoded column pages that a reader may need to decompress and decode. Memory-mapping a Parquet file alone does not eliminate decoding or all copies. Arrow Parquet reading and memory mapping
The Interop Story
Passing an Arrow array to another Arrow-aware tool can reuse its buffers when the types, layout and operation permit it. Conversions that require a different representation can allocate a copy. Include the conversion in a benchmark if it sits on your production path. Arrow and pandas memory usage
When to Make the Switch
Keep a copy of the input, the downstream join or group-by, the package versions and the null mask. Compare the end-to-end run and peak process memory on the same workload. If you export the result, check the stored schema after a round trip. For nullable numeric columns use our three-backend CSV fixture.
Correction, November 25, 2026. This update qualifies when pandas uses Arrow, corrects the Parquet memory-mapping explanation and replaces general speed and memory estimates with a reproducible column comparison.
Your notes on this article
Your name or initials, note and date stay in this browser profile. Anyone using the profile can read them. Delete a note below or clear this site’s browser data. To reach the editors, report a correction.
No notes saved here