title: performing function in for loop help? python
body: <p>Hello everyone I'm in the final step of my program to send in calendar but I can't seem to get my for loop to perform the function over the list. It only reads for 1 of the 3 in list. Here is my code below.</p>
  <pre><code>Order List = ['0730049','4291200','1830470']
  
  for eachId in Order_List:
  **Code to create orders into excel sheet.**
  
  df_list = [f'OrderId_{eachId}.xlsx']
  print(df_list)
  ***everything works fine up until here ***      
  for eachOrder in df_list:
    df = pd.read_excel (eachOrder,engine='openpyxl')
    New_Order_Date= df.iat[0,3]
    Order_obj_date= datetime.strptime(New_Order_Date,'%m/%d/%Y').date()
    print(Order_obj_date)
  </code></pre>
  <p>my df_list when I print shows me my list of .xlsx files created
  output :</p>
  <pre><code>'0730049.xlsx','4291200.xlsx','1830470.xlsx'
  </code></pre>
  <p>But now I need the New_Order_Date to read in each excel file properly and find the date which is at cell value (D,2). Currently, my formula for one excel file, the df. iat[0,3] works perfectly. How can I get it to perform that same search for each of the df_list?</p>
  <p>hopefully, this makes sense? but the current code that works for 1 file when printed to give everyone an idea equals:</p>
  <pre><code>New_Order_Date=df.iat[0,3]
  output: 07-01-2022
  </code></pre>
  <p>expected output;</p>
  <pre><code>0730049.xlsx= 07-01-2022
  4291200.xlsx= 07-04-2022
  1830470.xlsx= 07-27-2022
  </code></pre>