comparing two columns in the same csv file
I don't understand the question, and would be very confusing for others too.
However, it seems like a simple loop and condition code. Try using PANDAS with Python, the library to process the CSV in case this helps you.
I have a CSV file with two columns. 
One has values like size XL, size L, size M and size S. In the other I only have XL and L. 
What I want to do is that when my loop finds XL in the first column it overwrites that cell value with XL and when it doesn't find XL in the next cell it should just skip it. 
In the next iteration, it should do the same with L. The file should look something like this after the loop: XL, L, size M, size S.
Can you assist me with python code to implement something like this?