title: Pandas Error - Appending multiple files into one
body: <p>I have a set of files that do not have any extension. They are currently stored in a folder that is referenced by this variable "allFiles". </p>
  
  <pre><code>allFiles = glob.glob(base2 + "/*")
  </code></pre>
  
  <p>I am trying to add an extension to each of the files in allFiles. Add .csv to the file name. I do it using the below code:</p>
  
  <pre><code>for file in allFiles:
      os.rename(os.path.join(base2, file), os.path.join(base2, file+'.csv'))
  </code></pre>
  
  <p>Next I try to append each of these csv files into one as per the below code.</p>
  
  <pre><code>list_ = []
      for file_ in allFiles:
          try:
              df = pd.read_csv(file_, index_col=None, header=None,delim_whitespace = True, error_bad_lines=False)
              list_.append(df)
          except pd.errors.EmptyDataError:
              continue
  </code></pre>
  
  <p>When I run the above code, I get an error stating one of the files do not exist.</p>
  
  <pre><code>Error : FileNotFoundError: File b'/Users/base2/file1' does not exist
  </code></pre>
  
  <p>But file1 has now been renamed to file1.csv</p>
  
  <p>Could anyone advice as to where am I going wrong in the above. Thanks</p>
  
  <p>Update:</p>
  
  <pre><code>allFiles = glob.glob(base2 + "/*")
  print(allFiles)
  list_ = []
  print(list_)
  allFiles = [x + '.csv' for x in allFiles]
  print(allFiles)
  for file_ in allFiles:
      try:
          df = pd.read_csv(file_, index_col=None, header=None)
          list_.append(df)
      except pd.errors.EmptyDataError:
          continue
  
  Error : FileNotFoundError: File b'/Users/base2/file1.csv' does not exist
  </code></pre>