title: Python: How to use or get the column header in Pandas and use it as input/value
body: <p>I have the following script that produces an empty DataFrame using Pandas:</p>
  
  <pre><code>import pandas as pd
  import datetime
  
  #Creating a list of row headers with dates.
  start=datetime.date(2017,3,27)
  end=datetime.date.today() - datetime.timedelta(days=1)
  row_dates=[x.strftime('%m/%d/%Y') for x in pd.bdate_range(start,end).tolist()]
  identifiers=['A','B','C']
  #Creating an empty Dataframe
  df=pd.DataFrame(index=identifiers, columns=row_dates)
  
  print(df)
  </code></pre>
  
  <p>Now, suppose I have a function (let's call it "my_function(index,date)") that requires two inputs: an index, and a date. </p>
  
  <p>That function gives me an outcome and I want to fill the corresponding empty slot of the dataframe with that outcome. But for that, I need to be able to acquire both the index and the date. </p>
  
  <p>For example, let's say I want to fill the first slot of my DataFrame, I require index 'A' and the first Date which is '27/3/2017', so I have this:</p>
  
  <p>my_function('A', '27/3/2017')</p>
  
  <p>How can I make that happen for my entire DataFrame? My apologies if any of this sounds confusing.</p>