Let's say that I have two CSV files (file1 and file2) with the contents as shown below:
file1:
fred,43,Male,"23,45",blue,"1, bedrock avenue"
file2:
fred,39,Male,"23,45",blue,"1, bedrock avenue"
I would like to compare these two CSV records to see if columns 0,2,3,4 and 5 are the same. I do not need column 1.
What is the most pythonic way to do this?
EDIT:
Some sample code would be appreciated.
EDIT2:
Please note that inline commas must be handled correctly.
source
share