title: Pandas - import CSV files in folder, change column name if it contains a string, concat into one dataframe
body: <p>I have a folder with about 40 CSV files containing data by month.  I want to combine this all together, however I have one column in these CSV files that are either denoted as 'implementationstatus' or 'implementation'.  When I try to concat using Pandas, obviously this is a problem.  I want to basically change 'implementationstatus' to 'implementation' for each CSV file as it is imported.  I could run a loop for each CSV file, change the column name, export it, and then run my code again with everything changed, but that just seems prone to error or unexpected things happening.</p>
  <p>Instead, I just want to import all the CSVs, change the column name 'implementationstatus' to 'implementation' IF APPLICABLE, and then concatenate into one data frame. My code is below.</p>
  <pre><code>import pandas as pd
  import os
  import glob
  
  path = 'c:/mydata'
  
  filepaths = [f for f in os.listdir(&quot;.&quot;) if f.endswith('.csv')]
  df = pd.concat(map(pd.read_csv, filepaths),join='inner', ignore_index=True)
  df.columns = df.columns.str.replace('implementationstatus', 'implementation') # I know this doesn't work, but I am trying to demonstrate what I want to do
  </code></pre>