title: Apply pandas function to column to create multiple new columns?
body: <p>How to do this in pandas:</p>
  <p>I have a function <code>extract_text_features</code> on a single text column, returning multiple output columns. Specifically, the function returns 6 values.</p>
  <p>The function works, however there doesn't seem to be any proper return type (pandas DataFrame/ numpy array/ Python list) such that the output can get correctly assigned <code>df.ix[: ,10:16] = df.textcol.map(extract_text_features)</code></p>
  <p>So I think I need to drop back to iterating with <code>df.iterrows()</code>, as per <a href="https://stackoverflow.com/questions/7837722/what-is-the-most-efficient-way-to-loop-through-dataframes-with-pandas">this</a>?</p>
  <p>UPDATE:
  Iterating with <code>df.iterrows()</code> is at least 20x slower, so I surrendered and split out the function into six distinct <code>.map(lambda ...)</code> calls.</p>
  <p>UPDATE 2: this question was asked back around <a href="https://github.com/pandas-dev/pandas/releases?after=v0.13.0_ahl1" rel="noreferrer">v0.11.0</a>, before the useability <code>df.apply</code> was improved or <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.assign.html" rel="noreferrer"><code>df.assign()</code></a> was <a href="https://pandas.pydata.org/pandas-docs/stable/whatsnew/v0.16.0.html?highlight=assign" rel="noreferrer">added in v0.16</a>. Hence much of the question and answers are not too relevant.</p>