Profile, group, aggregate

A CSV is not a database. You can still ask it useful questions.

Profile the full file, narrow it with visible filters, and build grouped summaries locally. Move to a database when the questions become relational or repeatable.

Begin with column quality

For numbers, inspect min, max, quartiles, mean, standard deviation and the histogram. For text, inspect distinct and common values. For dates, check the valid range, empties and timeline. Invalid values should be counted, not coerced into zero.

Pivot a huge CSV locally

In csvlite, choose one or more grouping columns, then calculate count, sum, average, min, max, distinct count or a list of distinct values. The result opens in a new tab where it can be sorted, filtered, profiled and exported like another table.

Is CSV a database?

No. CSV has no schema, indexes, constraints, transactions, relationships or standard null semantics. Calling a folder of CSV files a database does not create those guarantees. But direct analysis is useful for one-off exports, logs and data handoffs where importing first would add friction.

When to switch to DuckDB

Use a database for joins, reusable SQL, window functions, durable typed tables, many-file queries and automated pipelines. Visual exploration in csvlite is strongest for understanding unfamiliar data and producing a focused result. The two tools complement each other.

A good sequence

Inspect → validate → filter → summarize in csvlite. Then import or query with DuckDB when the analysis becomes a program rather than an investigation.