I am trying to read data from a csv file that has been uploaded. First, I am getting each row then trying to read data from each row by splitting it with comma, which is good for ideal case but if contains "," like address field, it will parse data in wrong format.
I would like to have a more reliable solution for val = v.split(',')
My code is
upload_file = request.FILES['upload_file']
data = [row for row in csv.reader(upload_file.read().splitlines())]
for v in data:
# v is every row
val = v.split(',') #spliting value of every row to get each record of every row