title: how do you pass multiple variables to pandas dataframe to use them with .map to create a new column
body: <p>To pass multiple variables to a normal python function you can just write something like:</p>
  <pre><code>def a_function(date,string,float):
        do something....
        convert string to int, 
        date = date + (float * int) days
        return date
  </code></pre>
  <p>When using Pandas DataFrames I know you can create a new column based on the contents of one like so:</p>
  <pre><code>df['new_col']) = df['column_A'].map(a_function)
  # This might return the year from a date column
  # return date.year
  </code></pre>
  <p>What I'm wondering is in the same way you can pass multiple pieces of data to a single function (as seen in the first example above), can you use multiple columns in the creation of a new pandas DataFrame column?</p>
  <p>For example combining three separate parts of a date Y - M - D into one field.</p>
  <pre><code>df['whole_date']) = df['Year','Month','Day'].map(a_function)
  </code></pre>
  <p>I get a key error with the following test.</p>
  <pre><code>def combine(one,two,three):
      return one + two + three
  
  df = pd.DataFrame({'a': [1,2,3], 'b': [2,3,4],'c': [4,5,6]})
  
  df['d'] = df['a','b','b'].map(combine)
  </code></pre>
  <p>Is there a way of creating a new column in a pandas DataFrame using <code>.map</code> or something else which takes as input three columns and returns a single column?</p>
  <p>-&gt; Example input: <code>1, 2, 3</code></p>
  <p>-&gt; Example output: <code>1*2*3</code></p>
  <p>Likewise is there also a way of having a function take in one argument, a date and return three new pandas DataFrame columns; one for the year, month and day?</p>