0.6.14 Sorting, Filtering, and Summarizing Data

Structured Data Becomes More Useful When You Can Explore It

A clean table can contain hundreds or thousands of records.

Reading every row manually is rarely the best way to answer a question.

Spreadsheet tools support several basic exploration operations:

Each operation answers a different kind of question.

Sorting Changes the Order of the View

Suppose a song table contains:

Title Artist Genre Year
Northern Lights Example Band Rock 2024
Side Street Dana Lee Jazz 2022
Open Road Example Band Rock 2021

Sorting by Year can reorder the records.

Ascending:

Plain text
2021
2022
2024

Descending:

Plain text
2024
2022
2021

The records are the same.

Their displayed order changes.

Sorting Should Keep Records Together

If you sort only the Year cells while leaving titles and artists in place, the rows become incorrect.

A record's values must move together.

Spreadsheet sorting tools are designed to reorder the table as records.

Use them rather than manually moving one column independently.

Filtering Temporarily Limits Which Records Are Visible

A filter can answer:

Show only Rock songs.

The underlying dataset may contain Jazz and other genres.

The filtered view temporarily hides records that do not meet the current condition.

Filtering is useful when you want to focus on a subset without deleting the other records.

A Filter Does Not Mean the Hidden Data Is Gone

If a sheet displays only:

Plain text
Genre = Rock

other records may still exist in the dataset.

They are simply excluded from the current view.

This distinction matters when interpreting counts or screenshots.

Always notice whether a filter is active.

Multiple Filters Can Narrow the View

You might ask:

Show Rock songs released in 2024.

That uses more than one condition.

The exact spreadsheet controls vary.

The reasoning is stable:

Plain text
all records
   ↓
match Genre condition
   ↓
match Year condition
   ↓
visible subset

Summaries Answer Questions About Groups

A summary reduces many records into useful results.

For example:

How many songs are in each genre?

Possible result:

Genre Song Count
Jazz 12
Rock 28
Pop 19

The summary is not a replacement for the original records.

It is a new view derived from them.

Choose a Summary That Matches the Question

If the question is:

How many songs belong to each genre?

a count makes sense.

If the question is:

What is the average rating by genre?

an average may make sense if a numeric rating field exists.

Do not choose a calculation merely because the spreadsheet tool offers it.

The aggregation should fit the meaning of the field and the question.

Clean Data Matters Before Summarizing

Suppose Genre contains:

Plain text
Rock
rock
ROCK

A summary may show three groups.

The spreadsheet is accurately summarizing the values it received.

The underlying data is inconsistent.

This is why cleaning comes before serious interpretation.

Sorting, Filtering, and Summarizing Are Different

Sort

Change record order.

Filter

Show a selected subset.

Summarize

Calculate or group information across records.

A spreadsheet workflow may use all three.

Do not confuse them.

Ask a Question Before Choosing the Tool

Instead of:

I need to use a filter because that is the next button.

begin with:

What am I trying to learn from the data?

Then choose the operation.

Examples:

Question: Which songs are newest?
Operation: Sort by Year descending.

Question: Which songs are Rock?
Operation: Filter Genre.

Question: How many songs are in each genre?
Operation: Summarize by Genre.

The question gives the spreadsheet operation a purpose.

Exploration Should Preserve the Source Data

Sorting, filtering, and summaries are ways to examine the dataset.

Avoid destroying or rewriting source records simply to produce a particular view.

A strong analysis keeps the original data available while creating useful views from it.