While reading the csv using python csv library, it adds single quote to all the values.
Here is the code which reads the csv -
with open(csvfile, 'rb') as data:
reader = csv.reader(data)
for row in reader:
print row
CSV file content -
1,XYZ (A),ABC,7.05,13.10
while reading in python with csv.reader reads row in below format -
['1', 'XYZ (A)', 'ABC', '7.05', '13.10']
expected output -
[1, 'XYZ (A)', 'ABC', 7.05, 13.10]
I tried using quoting format, but no luck.
The other option I was thinking to convert it to appropriate format by individually iterating over the items in row read by csv.reader(file)
Any suggestion?