# DataFrame

> A table in a program. Code can sort it and add it up.

**Field:** Data Engineering  
**Category:** Processing  
**Also known as:** Data Frame, Dataframe

## Think of it like

It is like a chart drawn on paper. A program can read it, sort it and add it up for you.

## Definition

A DataFrame is a table held in a program, with named columns and rows. Each column has one type, such as numbers or text. Code can filter, join, group and add up a DataFrame in a few lines. pandas, Polars and Spark all use the idea. It is the main way to work with tables in Python and R.

## Example

An analyst loads a CSV of sales into a DataFrame. Two lines of code give the total sales for each city.

## Why it matters

It is how most code works with tables. Learn it once, and pandas, Polars and Spark all feel close.

## Common mistake

Looping over rows one at a time. Whole-column steps are many times faster.

## Three principles

- **Named columns.** One type per column.
- **Table steps in code.** Filter, join, group, sum.
- **Work by column.** Not row by row.

## Related terms

- [pandas](https://learn.benibix.com/term/data/pandas)
- [Polars](https://learn.benibix.com/term/data/polars)
- [Apache Spark](https://learn.benibix.com/term/data/apache-spark)
- [Structured Data](https://learn.benibix.com/term/data/structured-data)

---

Source: https://learn.benibix.com/term/data/dataframe
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
