title: Pandas: create two new columns in a dataframe with values calculated from a pre-existing column
body: <p>I am working with the <a href="http://pandas.pydata.org/" rel="noreferrer">pandas</a> library and I want to add two new columns to a dataframe <code>df</code> with n columns (n > 0).<br>
  These new columns result from the application of a function to one of the columns in the dataframe.</p>
  
  <p>The function to apply is like:</p>
  
  <pre><code>def calculate(x):
      ...operate...
      return z, y
  </code></pre>
  
  <p>One method for creating a new column for a function returning only a value is:</p>
  
  <pre><code>df['new_col']) = df['column_A'].map(a_function)
  </code></pre>
  
  <p>So, what I want, and tried unsuccesfully (*), is something like:</p>
  
  <pre><code>(df['new_col_zetas'], df['new_col_ys']) = df['column_A'].map(calculate)
  </code></pre>
  
  <p>What the best way to accomplish this could be ? I scanned the <a href="http://pandas.pydata.org/pandas-docs/stable/" rel="noreferrer">documentation</a> with no clue. </p>
  
  <p>**<code>df['column_A'].map(calculate)</code> returns a pandas Series each item consisting of a tuple z, y. And trying to assign this to two dataframe columns produces a ValueError.* </p>