title: re-ordering column names in multiple excel files in python
body: <p>I am trying to re-order column names in multiple excel files using the code below. This code is re-arranging column names in only last file. I think it is looping through all the files but may be making/saving changes only in the last file. Any help to make/save changes to all files is much appreciated.</p>
  <p>Full Code:</p>
  <pre><code>import os
  import glob
  import pandas as pd
  from pathlib import Path
  folder = (r&quot;C:\Users\Documents\Extracted\&quot;)
  
  
  for file_name in Path(folder).glob('*.xlsx'):
      df = pd.read_excel(file_name)
      New_df = df[['Id', 'Title', 'FirstName', 'LastName'']]
   
      New_df.to_csv(file_name.with_suffix('.csv'),index = False)
  </code></pre>