title: How can i capture the account and date field data and include them as columns using python
body: <p>We get a lot of excel files which have data sets like below (Image1):</p>
  
  <p><img src="https://i.stack.imgur.com/hFXYX.png" alt="enter image description here"></p>
  
  <p>In this data the first set of data belongs to account number <code>12314234</code> dated 2019 and the second set of data belongs to account number <code>2345345</code> dated 2018. The main issue in this type of data is to capture these account numbers and dates and align their data with the records.<br>
  We usually load these excel files in ACL and use static function on them to make them look like below:</p>
  
  <pre><code>id  first_name  last_name   Account     Year
  1   Vin         Gotecliffe  12314234    2019
  2   Ike         Groom       12314234    2019
  3   Bren        Knipe       12314234    2019
  4   Hermy       Purry       12314234    2019
  5   Ilysa       Knutton     12314234    2019
  1   Vin         Gotecliffe  2345345     2018
  2   Ike         Groom       2345345     2018
  3   Bren        Knipe       2345345     2018
  4   Hermy       Purry       2345345     2018
  5   Ilysa       Knutton     2345345     2018
  </code></pre>
  
  <p>If you notice the account number and the date field data has been captured and has been aligned in the column. In the above data the account number and date field values have been aligned with the data set they belong to.</p>
  
  <p>I was looking for a python code(Cannot use any other language due to restrictions) which can resolve this issue as we can convert these excel files to tab delimited files if we want. </p>
  
  <p>Note: Please do not put the question on hold. Please notify me if further description is required I'll put in more effort to make it clear. The issue is very hard to describe and may not be clear to everyone.</p>