I want to look for permutations that match with a given word, and arrange my data based on column position.
IE - I created a CSV with data I scrapped from several websites.Say it looks something like this:
Name1 OtherVars Name2 More Vars
Stanford 23451 Mamford No
MIT yes stanfor1d 12
BeachBoys pie Beatles Sweeden
I want to (1) find permutations of each word from Name1 in Name2, and then (2) print a table with that word from Name1+it's matching word in OtherVars + the permutation of that word in Name2+it's match in MoreVars. (if no matches found, just delete the word).
The outcome will be in this case:
Name1 OtherVars Name2 More Vars
Stanford 23451 stanford 12
So, how do I:
Find matching permutations for a word in other column?
Print the 2 words and the values they are mapped to in other columns?
PS - here's a similar question; however, it's java and it's pseudo code. How to find all permutations of a given word in a given text? Difflib seems not to be suitable for CSVs based on this: How to find the most similar word in a list in python
PS2 - I was advised to use Fuzzymatch
however, I suspect that it's an overkill in this case.