title: Append Pandas Series to DataFrame as a column
body: <p>I have panadas dataframe (df) like ['key','col1','col2','col3'] and I have pandas series (sr) for which the index is the same as 'key' in data frame. I want to append the series to the dataframe at the new column called col4 with the same 'key'. I have the following code:</p>
  
  <pre><code>for index, row in segmention.iterrows():    
       df[df['key']==row['key']]['col4']=sr.loc[row['key']]
  </code></pre>
  
  <p>The code is very slow. I assume there should be more efficient and better way to do that. could you please help?</p>