title: python convert CSV with comas inside values into Dictionary
body: <p>I need to process some CSV data I get from an external provider I can't control.</p>
  <p>The data has a fixed amount of columns, but variable amounts of rows.</p>
  <p>To summarize, it can look like this:</p>
  <pre><code>Version,Relative Path,Author,Date,Comment,Link
  1,somePath,someperson,01/20/2020,&quot;Some phrase with punctuation including comas, but in which case it seems to be automatically formatted with quotes...&quot;,some.url
  3,somePath,someperson,01/20/2020,Simple comment with no punctuation,another.url
  50,somePath,someperson,01/20/2020,Another comment,some.url
  </code></pre>
  <p>AFAIK the best way for me to do it is using this:</p>
  <pre class="lang-py prettyprint-override"><code>import csv
  
  with open(&quot;sample.csv&quot;, &quot;r&quot;) as csvFile:
      reader = csv.DictReader(csvFile)
      data = {}
      for row_dict in reader:
          for key, value in row_dict.items():
              data[key] = data.get(key, []) + [value]
  
  print(data)
  </code></pre>
  <p>And the result looks great! Except for the &quot;Comment&quot; column: as the comments have punctuations, and the CSV delimiter is <code>,</code>, this leads to the script splitting these commands into different items and messing up the dictionary.</p>
  <p>I wish I could ask the provider to make a specific CSV output for me, but that's unlikely to happen.</p>
  <p>HOWEVER: it looks like any comment item that contains such commas inside are provided between quotation marks <code>&quot;</code>. So I was wondering if I could somehow make the delimiter ignore whatever's between quotes?</p>
  <p>Or if you have anything better to obtain the same result, I'm fine with it. Though I can only use vanilla python 3.10.2, no modules like numpy (even though I'd love it). And if the solution is to edit the CSV's content, then it should preserve the comas inside the comments.</p>