title: Pandas update multiple columns at once
body: <p>I'm trying to update a couple fields at once - I have two data sources and I'm trying to reconcile them.  I know I could do some ugly merging and then delete columns, but was expecting this code below to work:</p>
  
  <pre><code>df = pd.DataFrame([['A','B','C',np.nan,np.nan,np.nan],
                    ['D','E','F',np.nan,np.nan,np.nan],[np.nan,np.nan,np.nan,'a','b','d'],
                    [np.nan,np.nan,np.nan,'d','e','f']], columns = ['Col1','Col2','Col3','col1_v2','col2_v2','col3_v2'])
  
  print df
  
   Col1 Col2 Col3 col1_v2 col2_v2 col3_v2
  0    A    B    C     NaN     NaN     NaN
  1    D    E    F     NaN     NaN     NaN
  2  NaN  NaN  NaN       a       b       d
  3  NaN  NaN  NaN       d       e       f
  
  #update 
  df.loc[df['Col1'].isnull(),['Col1','Col2', 'Col3']] = df[['col1_v2','col2_v2','col3_v2']]
  
  print df
  
   Col1 Col2 Col3 col1_v2 col2_v2 col3_v2
  0    A    B    C     NaN     NaN     NaN
  1    D    E    F     NaN     NaN     NaN
  2  NaN  NaN  NaN       a       b       d
  3  NaN  NaN  NaN       d       e       f
  </code></pre>
  
  <p>My desired output would be:</p>
  
  <pre><code> Col1 Col2 Col3 col1_v2 col2_v2 col3_v2
  0    A    B    C     NaN     NaN     NaN
  1    D    E    F     NaN     NaN     NaN
  2    a    b    c       a       b       d
  3    d    e    f       d       e       f
  </code></pre>
  
  <p>I'm betting it has to do with updating/setting on a slice, but I always use .loc to update values, just not on multiple columns at once.</p>
  
  <p>I feel like there's an easy way to do this that I'm just missing, any thoughts/suggestions would be welcome!</p>
  
  <p><strong>Edit to reflect solution below</strong>
  Thanks for the comment on the indexes.  However, I have a question about this as it relates to series.  If I wanted to update an individual series in a similar manner, I could do something like this:</p>
  
  <pre><code>df.loc[df['Col1'].isnull(),['Col1']] = df['col1_v2']
  
  print df
  
    Col1 Col2 Col3 col1_v2 col2_v2 col3_v2
  0    A    B    C     NaN     NaN     NaN
  1    D    E    F     NaN     NaN     NaN
  2    a  NaN  NaN       a       b       d
  3    d  NaN  NaN       d       e       f
  </code></pre>
  
  <p>Note that I didn't account for the indexes here, I filtered to a 2x1 series and set that equal to a 4x1 series, yet it handled it correctly.  Thoughts?  I'm trying to understand the functionality a bit better of something I've used for a while, but I guess don't have a full grasp of the underlying mechanism/rule</p>