title: How to pass multiple dataframe columns to a function
body: <p>In Python i have created a function that has 4 arguments (2 mandatory 2 optional)</p>
  
  <pre><code>    def combineDateTime(dateInput, timeInput, dateInputFormat='%Y-%m-%d', timeInputFormat='%H:%M:%S'):
  .....
  </code></pre>
  
  <p>I want to create a new column on my dataframe by calling the function and passing it the values from 2 of the existing dataframe columns, however i cannot get my head around the syntax required in order to pass the required columns.  </p>
  
  <p>The function tests the type of the values passed (eg str, int etc) and does different things depending on it but i think the issue is that its being passed a series and therefore the logic isn't working.</p>
  
  <p>Can anyone advise how i should be calling it.  I'm trying to use the .apply functionality.</p>
  
  <pre><code>df_scd2_pd['NewColumn'] = df_scd2_pd[[col_EffFromDT,col_EffFromTM]].apply(combineDateTime, axis=1)
  </code></pre>
  
  <p>Many Thanks</p>