I am trying to read CSV file which has below data
"27@21","","2725 abc dr"","","Mumbai","IN",""
using below code
with open(file, "r") as csv_file:
reader = csv.reader(csv_file, delimiter=',')
for row in reader:
colValues = list(row)
print(colValues)
it is giving an output as
['27@21', '', '2725 abc dr",",Mumbai"', 'IN', '']
If you look into the above bold output, it is the combination of three columns of inputs.
I want this output to be same as input given.
Note: I am creating a utility to process any csv file with an unexpected special characters like double quote anywhere in column value and create new file with removing such characters. For this purpose I need this problem to be solved.