title: Pandas update multiple columns using apply function
body: <p>I am updating a data frame using apply of function.  </p>
  
  <p>But now I need to modify multiple columns using this function,</p>
  
  <p>Here is my sample code:</p>
  
  <pre><code>def update_row(row):
      listy = [1,2,3]
      return listy
  
  dp_data_df[['A', 'P','Y']] = dp_data_df.apply(update_row, axis=1)
  </code></pre>
  
  <p>It is throwing the following error:</p>
  
  <pre><code>ValueError: shape mismatch: value array of shape (10,) could not be broadcast to indexing result of shape (3,10)
  </code></pre>
  
  <p>Thanks in advance.</p>