onyxfish/csvkit — pull request #202 by lukerosiak (2013-02-20 02:44:50+00:00)
Title: Fuzzy join

Don't know if you have any interest in adding this, but I've made a quick fuzzy join csv tool that uses levenstein to do closest-string matching, and I use it when I have two csv's including names that are standardized differently and I want to reconcile them, incorporating IDs from one spreadsheet into the other.

(Seems like a common question people have on NICAR-L--how to reconcile names across two separate sets, whereas Google Refine only lumps similar names together within one set.)

This is the first time I've ever tried to merge code into a project, so apologies if something's not right. I did include a simple test (and CSVs in the examples directory) that do a fuzzy join on a list of all black lawmakers, pulling in the correct IDs and other information from a master list of all lawmakers (which spells their names differently).

As noted in the markdown file I've added, it depends on this repo: https://github.com/seatgeek/fuzzywuzzy
which I've added to requirements.txt.