How to use the CSV Merger
- 1. Choose filesPick two or more CSV files (or try the sample files).
- 2. Pick how to mergeStack rows from every file, or join the first two on a key column.
- 3. DownloadGet merged.csv with a preview of the result.
Stack or join?
Stack appends the rows of every file, for example 12 monthly sales exports. Columns are matched by header name, so the order can differ between files; a file without a column gets blanks there. An optional Source file column records where each row came from.
Join matches rows of two files on a key, such as Student ID, like a VLOOKUP or SQL join. A left join keeps every row of the first file, an inner join keeps only rows found in both, and a full outer join keeps everything. Files are read by your browser and never uploaded.
Worked example
The sample files are students.csv (S01–S04 with name and course) and fees.csv (S01, S02, S04 and S05 with fee paid and city). Stacking gives 8 rows with 6 columns, including Source file. A left join on Student ID gives 4 rows: S03 has no fee record, so its fee is blank. An inner join gives 3 rows, and a full outer join gives 5, because S05 appears only in the fees file.
Details
- Keys are compared after trimming spaces; if a key appears twice in the second file, each match gets its own row, as in SQL.
- Row counts for all three join types matched pandas'
mergeon 30 test cases. - Same-named columns from the second file get the file name added, so nothing is overwritten.
Frequently asked questions
How many files can I stack?
As many as your browser can hold in memory; dozens of typical exports are fine.
Can I join on two columns?
Not yet. Combine them into one key column first, for example with our data cleaning tool or a formula.
Is the CSV merger free?
Yes. You can open the CSV merger, load files and set every option without signing up. When you merge files for the first time, we ask once for your name and WhatsApp number; after that it, and every other Uncodemy tool, opens straight away.