Programming · Flagship experience

pandas & Table Thinking

What does a DataFrame represent beyond “an Excel-like table”?

Start here

What does a DataFrame represent beyond “an Excel-like table”?

A DataFrame is a labelled, typed table where rows have a grain and columns have meanings. Good pandas work starts by preserving those semantics through each transformation.

Building interactive view…
Understand

Build the mental model

A DataFrame is a labelled, typed table where rows have a grain and columns have meanings. Good pandas work starts by preserving those semantics through each transformation. State row grain before merging or aggregating. Inspect shape, dtypes, keys and missingness after major transformations.

Click a stage to inspect what happens, what changes, and what should be checked before moving on.
Stage 1

Define row grain

For the “Define row grain” stage, identify the incoming object, the rule applied to it, the state change produced, and the evidence that would reveal a mistake. Technical context for pandas & Table Thinking: Selection, filtering, grouping, joining and reshaping transform table structure. Index alignment and data types can silently affect results, so intermediate inspection matters.

Practitioner checkpoint: State row grain before merging or aggregating. Inspect shape, dtypes, keys and missingness after major transformations.
What happens if…?

Break the assumption deliberately

Create a many-to-many merge accidentally and watch row counts explode.

Move the control and explain what you expect before reading the visual.

Technical lens

Formalise what the visual is doing

Selection, filtering, grouping, joining and reshaping transform table structure. Index alignment and data types can silently affect results, so intermediate inspection matters.

Technical questionUse a tiny case to make the mechanism observable. Selection, filtering, grouping, joining and reshaping transform table structure. Index alignment and data types can silently affect results, so intermediate inspection matters. Verify one intermediate quantity, state change or mapping independently; then predict the consequence of this change: Create a many-to-many merge accidentally and watch row counts explode.
Practitioner lens

Use it responsibly

State row grain before merging or aggregating. Inspect shape, dtypes, keys and missingness after major transformations.

Transfer testTransfer this idea to a new example and justify each decision using this practitioner rule: State row grain before merging or aggregating. Inspect shape, dtypes, keys and missingness after major transformations. Then explain what should change if you deliberately test: Create a many-to-many merge accidentally and watch row counts explode.
Worked exploration

Use the visual as an experiment, not decoration

Start with one row per order. Group by customer to obtain one row per customer, then join customer attributes. Track row grain and row count before/after each step so an accidental many-to-many merge is visible.

Technical lens

Selection, filtering, grouping, joining and reshaping transform table structure. Index alignment and data types can silently affect results, so intermediate inspection matters.

Practitioner check

State row grain before merging or aggregating. Inspect shape, dtypes, keys and missingness after major transformations.

Prediction before interaction
Create a many-to-many merge accidentally and watch row counts explode.
Exploration walkthrough

Turn the interaction into an evidence trail

Start with one row per order. Group by customer to obtain one row per customer, then join customer attributes. Track row grain and row count before/after each step so an accidental many-to-many merge is visible. Before moving the control, state your prediction. After the visual changes, name the specific state, statistic, boundary or mapping that changed and explain why that change is consistent—or inconsistent—with your prediction.

  • Record one observable quantity before the interaction and the same quantity afterwards.
  • Change one factor at a time so the causal effect of the control is inspectable.
  • Use an edge or failure case to discover where the concept stops behaving as the simple story suggests.
Reference depth

Open the complete material

The flagship experience is the map. These pages contain the roads.

Continue this exact concept

Choose depth, practice or application.

These destinations are explicitly mapped to pandas & Table Thinking; they are not generic landing-page fallbacks.