title: Replace the column names in all the files based on the lookup values in Python
body: <p>I have a requirement where I need to standardize all the column names from all the files under a root directory and subdirectory</p>
  
  <p>suppose my root directory is <em>C:\Test\Project_files</em> and under this folder I have 3 more subdirectories
  Project 1,Project 2,Project 3. Each subdirectory has one csv file in it. </p>
  
  <p>The Files are named in a required format, for ex: 100_abc.csv. 200_def.csv etc</p>
  
  <p><a href="https://i.stack.imgur.com/XiNXL.png" rel="nofollow noreferrer">100_abc.csv file data</a></p>
  
  <p>I have a lookup file from which i need to replace the column names of 100_abc.csv file based on the project_id field</p>
  
  <p><a href="https://i.stack.imgur.com/XiNXL.png" rel="nofollow noreferrer">Lookup File</a></p>
  
  <p>The project id field should be taken from the filename (100_abc.csv), In this case 100 (anything before the first occurence of _ (underscore)) is the project id (it can be alphanumeric as well), based on this project id it has to match the headers from 100_abc.csv file with the src_val from the lookup file and replace them with the Tgt_val in all the files</p>
  
  <p>Please help me out guys, am very new to Python and tried so many ways but I am not able to proceed further after loading the data to the dataframe</p>