title: passing column list as argument in pandas read_csv
body: <p>We have couple of large <code>.tsv</code> files and trying to extract the data from it. we are passing column list as argument, however we are getting duplicate <code>ValueError: Duplicate names are not allowed.</code>.</p>
  <p>However, we have no issues if we pass the values as <code>names=['coming_from','article','referrer_type','n']</code></p>
  <p>Here is my code</p>
  <pre><code>import datetime,json,pyodbc
  import pandas as pd
  
  class LoadData:
      def __init__(self,colname):
          self.colsname=colname
  
      def _read_file_extract_col_data_convert_data_into_json(self):
          _filepath_name = r&quot;E:\PythonScripts\PyCharm\files\source\clickstream-enwiki-2018-12.tsv&quot;
          col_names='['+self.colsname+']'
          for chunk in (pd.read_csv(_filepath_name, delimiter=&quot;\t&quot;, header=0,names=col_names, 
          chunksize=1,mangle_dupe_cols=True)):
          json_chunk = chunk.to_json(orient=&quot;records&quot;, force_ascii=True, default_handler=None)
          print(json_chunk)
  
  list=[]
  collist=&quot;'coming_from'&quot;,&quot;'article'&quot;,&quot;'referrer_type'&quot;,&quot;'n'&quot;
  
  
  p1=LoadData(','.join(collist))
  p1._read_file_extract_col_data_convert_data_into_json()
  </code></pre>
  <p>Error:</p>
  <blockquote>
  <p>Traceback (most recent call last):   File
  &quot;E:/PythonScripts/PyCharm/PythonScripts_withPyCharm/DataIngestionScripts/File_To_JSON.py&quot;,
  line 54, in 
  p1._read_file_extract_col_data_convert_data_into_json()   File &quot;E:/PythonScripts/PyCharm/PythonScripts_withPyCharm/DataIngestionScripts/File_To_JSON.py&quot;,
  line 17, in _read_file_extract_col_data_convert_data_into_json
  for chunk in (pd.read_csv(_filepath_name, delimiter=&quot;\t&quot;, header=0,names=col_names, chunksize=1,mangle_dupe_cols=True)):   File
  &quot;C:\python_customize_install_location\lib\site-packages\pandas\io\parsers.py&quot;,
  line 686, in read_csv
  return _read(filepath_or_buffer, kwds)   File &quot;C:\python_customize_install_location\lib\site-packages\pandas\io\parsers.py&quot;,
  line 449, in _read
  _validate_names(kwds.get(&quot;names&quot;, None))   File &quot;C:\python_customize_install_location\lib\site-packages\pandas\io\parsers.py&quot;,
  line 415, in _validate_names
  raise ValueError(&quot;Duplicate names are not allowed.&quot;) ValueError: Duplicate names are not allowed.</p>
  </blockquote>