I have two csv file: list.csv company.csv
list.csv has four columns: company name,info1, info2, info3 where last three columns are empty and need to be updated based on data from company.csv
company.csv also has four columns: company name,info1, info2, info3
So what I want to do is go through company name column in list.csv and compare and find matching value in company.csv, then update info 1 to 3. I searched on Stackoverflow and it seems like I can use merge to solve this problem.
But another problem is that some of the company name in list.csv has misspelling.
For example, Stackoverflow is misspelled as Stackobarflow in list.csv. Therefore, instead of look for exactly the same company name in company.csv, I want to search for company name that has the same first four letters and regard it as same company.
How can I do this? I know I have to upload some codes when asking for a help but I have no idea how to do this in python
EDIT
list.csv
| Company Name | info1 | info2 | info3 |
|---|---|---|---|
| Faceboook | N/A | N/A | N/A |
| Stakoverflow | N/A | N/A | N/A |
company.csv
| Company Name | info1 | info2 | info3 |
|---|---|---|---|
| 10 | 20 | SNS | |
| Stackoverflow | 20 | 20 | Coding |
result.csv
| Company Name | info1 | info2 | info3 |
|---|---|---|---|
| Faceboook | 10 | 10 | SNS |
| Stakoverflow | 20 | 20 | Coding |