Convert long tidy CSV to wide pivot format
Convert long-format (tidy) CSV to wide pivot format by spreading a variable column into column headers.
🛡️ Your rows never leave your browser.
Why Onfyt: Same operation as Pivot a CSV (#82). These two tools are recommended for consolidation into one bidirectional pivot/unpivot tool.
Interactive Sample Data
| region | quarter | revenue |
|---|---|---|
| Nairobi | Q1 | 4500 |
| Nairobi | Q2 | 5200 |
| Mombasa | Q1 | 3200 |
How this tool works
The inverse of unpivot: takes a long tidy dataset (one observation per row) and spreads a categorical column across new column headers. Starting from region+quarter+revenue in long format, pivot produces one row per region with Q1, Q2, Q3, Q4 as columns.
Note: This is essentially the same operation as 'Pivot a CSV' (tool #82). Both are included because users search for this operation by different names. The underlying operation is identical.
Long-form event logs and tidy datasets often need to be reshaped into wide comparison matrices for human reporting, executive summaries, and cross-tabulation. DataFix pivots long-form categorical columns into individual header dimensions, aggregating values according to your business rules and producing clean, presentation-ready spreadsheets.
Pivoting normalized transactional logs into wide comparison matrices structures cross-tabulated reports for executive presentations and human visual review.
Pivoting long-form event logs into wide cross-tabulation matrices organizes transactional data into clean comparison layouts for human review, executive briefings, and financial reporting across quarters, departments, and product categories.
Pivoting event streams into wide comparison tables structures transactional logs for visual analysis and executive summaries. Cross-tabulating dimensions allows rapid side-by-side metric comparisons across categories. Missing value fill parameters allow populating unobserved row-column combinations with zeroes or explicit null markers in the generated pivot table. Aggregation function selectors allow choosing between summation, averaging, or counts when consolidating multi-row entries.
Things that usually go wrong
- Duplicates: if (id, variable) is not unique, multiple values exist for one cell — specify an aggregation function.
- High-cardinality variable columns (thousands of unique values) produce very wide output.
Edge cases we tested
🧪 Multiple rows for same row+column key
Aggregated with sum by default; user can choose mean/count.
🧪 Duplicate key combinations in long format
Aggregates values via sum or count according to user selection.
Frequently Asked Questions
What aggregation functions are available for duplicate cells?
Sum, average, min, max, count, first, last, and concatenate.
Can I pivot on multiple row identifier columns?
Yes — select multiple ID columns for a compound key.
Related tools
Reshape
Transpose CSV
Flip a CSV matrix by turning rows into columns and columns into rows.
Open Tool →
Reshape
Pivot a CSV
Summarise long-format CSV data into pivot tables grouped by row and column keys.
Open Tool →
Reshape
Group By and Count
Aggregate CSV rows by one or more group-by columns with count, sum, mean, min, or max.
Open Tool →