In other words, I'm looking for a way to ignore "," in one of the fields.
A field should be considered as one field, although it contains a comma.
Example:
Round,Winner,place,prize
1,xyz,1,$4,500
If I read this with a dict reader $4,500, it will be printed as $4, because it 500is considered a different field. This makes sense since I am reading the file as a comma, so I cannot complain, but try to find a job.
reader = csv.reader(f, delimiter=',', quotechar='"')
My source is not enclosed in double quotes, so I cannot ignore by including a quote line.
Is there any other way to handle this scenario? Probably something like defining these dollar fields and making it ignore the commas for this area? Or try to include quotes around this field?
If not Python, can a shell script or Perl be used?
source
share