Unpivot / Melt a CSV
Turn a spreadsheet-shaped table into something a database or charting library can actually use. A file with one column per month becomes one row per month — the transformation pandas calls melt and SQL people call unpivoting. Tick the columns to keep as identifiers; everything else collapses into a name column and a value column.
How to unpivot a CSV
- Paste the wide CSV or drop a file.
- Tick the columns that identify each row — usually an ID, a name, a region. Leave the measure columns unticked.
- Rename the output headers if
variableandvaluearen't meaningful;monthandrevenueusually read better. - Copy or download. Row count multiplies: 12 monthly columns over 50 rows gives 600 rows.
What it looks like
Before — one column per month, which is fine for humans and terrible for tooling:
region,jan,feb,mar
North,120,95,140
South,80,110,60
After — keeping region, with the name column renamed to month and the value column to revenue:
region,month,revenue
North,jan,120
North,feb,95
North,mar,140
South,jan,80
South,feb,110
South,mar,60
Why long format is worth the extra rows
Long data has a fixed schema: adding April means one more row, not one more column and a migration. Every chart library, GROUP BY, and BI tool expects it. Wide tables are a presentation format — build them at the end with Pivot table, and keep the stored version long.
FAQ
What if a cell is blank?
By default blank values are skipped, so you don't get thousands of empty rows. Untick the option when the absence itself matters and you want a row for every combination.
Can I unpivot only some of the measure columns?
Yes — any column you tick is kept as an identifier and left alone. To exclude a column entirely, drop it first with Keep / rename / reorder.
Is this the same as transposing?
No. Transpose flips the whole grid so rows become columns. Unpivoting keeps your ID columns intact and only reshapes the measures.
Is anything uploaded?
No — it all runs in your browser.
Privacy
100% client-side. No upload. See the privacy policy.