liveBook · Manning

Data grouping

Data grouping is the organization of data into groups according to shared values, keys, or other criteria, supporting grouped processing, analysis, or retrieval.

How 6 Manning books explain it

Pandas Workout: 200 exercises to make you a stronger data analyst

groupby is a pandas operation that partitions data according to one or more keys so that grouped computations can be performed.

How it is used
Answers per-category analytical questions by aggregating data-frame subsets into sortable and plottable results.
How deep it goes
Works through grouping keys, selected columns, mean and count aggregations, returned Series indexes, sorting, binning, and plotting preparation.
Examples
Uses taxi fares by passenger count, salaries by employment, trip-distance bins, and city counts by state.
What you can do after
Apply it via pandas to calculate, sort, clean, format, and plot per-group summaries.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains data grouping →

Kafka Streams in Action, Second Edition

GroupBy is a Kafka Streams DSL operation that remaps stream records to a selected key before grouping them for downstream processing.

How it is used
Groups Kafka Streams records under a selected key before stateful aggregation.
How deep it goes
Explains key remapping, repartitioning, KStream aggregation, and KTable add/subtract update handling.
Examples
Uses stock transactions grouped by symbol and stock alerts grouped by market segment.
What you can do after
Apply it via Kafka Streams to rekey records and build grouped KStream or KTable aggregates.

Read how Kafka Streams in Action, Second Edition explains data grouping →

Starting Data Analytics with Generative AI and Python

A groupby operation partitions tabular rows by one or more key columns so that aggregations or transformations can be computed separately for each group.

How it is used
Supports business comparisons across product categories, regions, and review classifications.
How deep it goes
Explains grouping, aggregation, flattening, ratios, visualization, and validation, but does not develop grouping internals.
Examples
Uses category-state averages, grouped review counts, review ratios, scatterplots, and grouped bar charts.
What you can do after
Apply it via pandas to produce grouped summary tables, ratios, and visual comparisons while checking code and scale.

Read how Starting Data Analytics with Generative AI and Python explains data grouping →

Build Python Web Apps with Streamlit

Pandas groupby is a dataframe operation that partitions rows into groups and supports aggregation across those groups.

How it is used
Aggregates filtered dataframe rows into daily metrics for dashboard time-series charts.
How deep it goes
Explains grouping, per-group apply, group labels, and index restoration, then stops short of broader aggregation patterns.
Examples
Uses filtered California sales rows, daily totals, a reusable metric helper, and a Plotly time-series chart.
What you can do after
Apply via pandas to produce grouped daily data for dashboard visualizations.

Read how Build Python Web Apps with Streamlit explains data grouping →

Statistics Every Programmer Needs

groupby is a pandas method that partitions data into groups defined by one or more key columns for separate operations.

How it is used
Uses pandas grouping to count observations, compare categories, and monitor subgroup means in statistical and quality-control workflows.
How deep it goes
Explains grouping through executable count, aggregation, visualization, and control-limit workflows without detailing pandas internals.
Examples
Demonstrates random-integer counts, raisin statistics by class, and piston-ring means across manufacturing samples.
What you can do after
Apply it via pandas to produce group counts, descriptive summaries, subgroup visualizations, and quality-control statistics.

Read how Statistics Every Programmer Needs explains data grouping →

Outlier Detection in Python

groupby is a pandas method that partitions rows into groups sharing specified key values for subsequent aggregation or transformation.

How it is used
Uses row partitions to screen duplicate transactions and construct entity-level tables for subsequent anomaly detection.
How deep it goes
Explains grouping through pandas counts and multi-statistic summaries, but does not descend into groupby internals or algorithm derivations.
Examples
Uses purchase records grouped by staff, products, suppliers, dates, and hours, plus product summary tables.
What you can do after
Diagnose/debug with it: identify repeated transaction combinations and prepare entity-level features for anomaly tests.

Read how Outlier Detection in Python explains data grouping →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.