csv-excel-merger
Skill321 starsChanged 2 months agoMITView on GitHub
Merges, appends, joins, and deduplicates multiple CSV, TSV, and Excel files (including multi-sheet workbooks) with pandas - mapping mismatched column names to one schema, normalizing keys, resolving conflicting values, tracking which file each row came from, and verifying the row math. Use when the user wants to combine spreadsheets or exports, stack monthly files, consolidate contact or lead lists, VLOOKUP-style join two sheets on an ID or email, or dedupe records across sources, even if they only say "put these together" or "clean up these lists into one".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- th-efool/SKILLStheir own version, first seen Aug 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- th-efool/SKILLS★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository228 other files it gives its agents.
- accessibility-auditorSkill
- agent-armySkill
- agent-eval-harnessSkill
- agent-swarm-deployerSkill
- agent-team-builderSkill
- agent-to-agentSkill
- ai-coding-guardrailsSkill
- ai-readiness-assessmentSkill
- animateSkill
- api-documentation-writerSkill
- api-endpoint-scaffolderSkill
- api-load-testerSkill
- athlete-social-media-managerSkill
- before-you-buildSkill
- bi-measure-builderSkill
- board-deck-generatorSkill
- bookkeeping-closeSkill
- bracket-predictorSkill
- brand-consistency-checkerSkill
- brand-voice-analyzerSkill
- browser-test-loopSkill
- budget-optimizerSkill
- cash-flow-forecasterSkill
- champion-identifierSkill
- churn-autopsySkill
- claude-design-criticSkill
- claude-design-system-architectSkill
- claude-landing-composerSkill
- claude-md-writerSkill
- client-health-dashboardSkill
- client-proposal-generatorSkill
- code-review-proSkill
- cold-email-sequence-generatorSkill
- color-palette-extractorSkill
- commercial-lease-analyzerSkill
- company-announcement-writerSkill
- competitor-content-analyzerSkill
- competitor-intel-agentSkill
- competitor-price-trackerSkill
- compliance-checkerSkill
- contact-hunterSkill
- content-repurposerSkill
- context-budgetSkill
- contract-analyzerSkill
- contract-redlinerSkill
- conversation-archaeologistSkill
- cowork-calendar-defragSkill
- cowork-contract-renewal-radarSkill
- cowork-data-room-builderSkill
- cowork-deal-roomSkill
- cowork-expense-auditSkill
- cowork-folder-organizerSkill
- cowork-hiring-screenerSkill
- cowork-home-inventorySkill
- cowork-inbox-triageSkill
- cowork-invoice-chaserSkill
- cowork-medical-bill-auditorSkill
- cowork-qbr-builderSkill
- cowork-rfp-responseSkill
- cowork-sop-writerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 23
Profile inputs: Run the bundled profiler first.
- Very specific: line 38
Merge: Read every file with dtype=str so IDs, ZIP codes, and phone numbers keep leading zeros, then convert specific columns afterward.
- Distinctive: line 72
Verify before reporting: Never hand back a merge without checking it:
- Distinctive: line 85
Write output and report: Use the layout in references/output_template.md.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CSV/Excel Merger
Combine tabular files into one clean output without silently losing, duplicating, or corrupting rows.
Workflow
Copy this checklist and track progress:
- [ ] 1. Profile inputs
- [ ] 2. Choose append vs join
- [ ] 3. Map columns and normalize keys
- [ ] 4. Merge and resolve conflicts
- [ ] 5. Verify row math
- [ ] 6. Write output and reportProfile inputs. Run the bundled profiler first; it reports encoding, delimiter, rows, headers, candidate keys, and header overlap without changing anything:
python scripts/profile_inputs.py file1.csv file2.xlsxExcel files are profiled per sheet. Confirm with the user which sheets count if a workbook has more than one.
- Choose the operation. This is the decision that most often goes wrong:
- Append (stack) - same kind of records from different sources or periods (Jan + Feb exports, three lead lists). Use
pd.concat, then dedupe. - Join (enrich) - different facts about the same entities (contacts + their deal values). Use
pd.mergeon a key. - Unsure? If the files share most columns, append. If they share only an ID column, join.
- Append (stack) - same kind of records from different sources or periods (Jan + Feb exports, three lead lists). Use
- Map columns and normalize keys. Build an explicit
{original: unified}rename map per file (see references/merge_strategies.md for common variants) and show it to the user when any match is fuzzy. Normalize key columns before dedupe or join: strip whitespace, lowercase emails, strip non-digits from phones, unify date formats. Without this,A@x.comanda@x.comsurvive as two people. Merge. Read every file with
dtype=strso IDs, ZIP codes, and phone numbers keep leading zeros, then convert specific columns afterward.import pandas as pd frames = [] for path, rename in [("jan.csv", {"E-mail": "email"}), ("feb.xlsx", {"Email Address": "email"})]: df = (pd.read_excel(path, dtype=str) if path.endswith((".xlsx", ".xls")) else pd.read_csv(path, dtype=str, encoding="utf-8-sig", # use the profiler's encoding keep_default_na=False)) df = df.rename(columns=rename) df["email"] = df["email"].str.strip().str.lower() df["source_file"] = path # lineage for every row frames.append(df) combined = pd.concat(frames, ignore_index=True, sort=False) # Blank keys are not duplicates of each other: set them aside before deduping. has_key = combined["email"].fillna("") != "" # Later files win: list the most recent source last, then keep="last". deduped = combined[has_key].drop_duplicates(subset=["email"], keep="last") no_key = combined[~has_key] merged = pd.concat([deduped, no_key], ignore_index=True)For a join, make pandas enforce the relationship you expect so a duplicate key raises instead of multiplying rows:
out = pd.merge(contacts, deals, on="email", how="left", validate="one_to_one", indicator=True) unmatched = out[out["_merge"] == "left_only"]Conflict strategies (keep first/last/most complete, combine fields, flag for review) are in references/merge_strategies.md.
Verify before reporting. Never hand back a merge without checking it:
rows_in = sum(len(f) for f in frames) assert len(merged) > 0, "merge produced an empty frame" assert len(merged) <= rows_in, "more rows out than in: check the join keys" assert deduped["email"].is_unique, "duplicate keys remain after dedupe" print(f"in={rows_in} out={len(merged)} removed={rows_in - len(merged)} blank_keys={len(no_key)}") print(merged["source_file"].value_counts())Spot-check three removed duplicates by hand against the source files; the asserts prove the math, not that the right row won.
- Write output and report. Use the layout in references/output_template.md.
- CSV for Excel users:
to_csv(path, index=False, encoding="utf-8-sig")(the BOM makes Excel read accents correctly). - Excel:
to_excel(path, index=False)with openpyxl installed. A sheet holds at most 1,048,576 rows; split or use CSV/Parquet beyond that. - Also write
conflicts_review.csvorunmatched.csvwhen those sets are non-empty.
- CSV for Excel users:
pandas version notes
Current pandas is 3.x (Python 3.11+). Differences that affect merges:
- Text columns default to the
strdtype, notobject. Checkpd.api.types.is_string_dtype(col)instead ofdtype == object. - Copy-on-Write is always on. Chained assignment such as
df[col][mask] = xnever updatesdf(pandas only warns); usedf.loc[mask, col] = x. - Parsed datetimes default to microsecond resolution. Call
.dt.as_unit("ns")before casting to integers if something downstream expects nanoseconds. pd.read_excel(..., engine="calamine")(needspython-calamine) reads large workbooks much faster than openpyxl.
The code in this skill also runs on pandas 2.2.
Failure modes to check for
- Row explosion on join - duplicate keys on both sides multiply rows.
validate=catches it. - Leading zeros lost - reading without
dtype=strturns01234into1234. - Excel-mangled values - long IDs already shown as
1.23E+15or dates already reformatted in the source file cannot be recovered by pandas; flag them. - Header rows not on line 1 - exports with a title block need
skiprows=orheader=. - Mixed encodings - one file in cp1252 among UTF-8 files shows up as
éartifacts. The profiler reports the encoding per file. - Silent column drops - a column present in only one file becomes mostly empty after append. Keep it and report its completeness; never drop data without saying so.
- Large files (over a few hundred MB) - read with
chunksize=or use Polars/DuckDB, and dedupe with a key set instead of loading everything into memory.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

