title: Removing duplicate columns from pandas.read_csv()
body: <p>By default, <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html" rel="noreferrer"><code>pandas.read_csv()</code></a> mangles duplicate CSV headers in the form of X, X.1, ..., X.N.</p>
  
  <p>The flag <code>mangle_dupe_cols = False</code> returns:</p>
  
  <p><code>ValueError: Setting mangle_dupe_cols=False is not supported yet</code></p>
  
  <p>This to me seems foolish as to why you would allow a Boolean flag but disable the Boolean-ness...</p>
  
  <p>Is there a way through the pandas API that is best suited for detecting/removing duplicate headers upon DataFrame initialization through the <code>read_csv()</code> method?</p>
  
  <p><strong>Possible Solution (non-API)</strong>:</p>
  
  <pre><code>headers = set(df.columns) # will include 'X' and 'X.1'
  n = 0
  unique = []
  for i in range(len(headers)):
      d = 1
      if i != n:
          continue # skip dupes
      elif (headers[i] + '.' + str(d)) in headers:
          while True: # find next unique element
              d += 1
              n += 1
              if (headers[i] + '.' + str(d)) not in headers:
                  break
      unique.append(headers[i])
      n += 1
  </code></pre>