title: Keyerror : Creating a dataframe column using square root of the sum of square of two column values
body: <p>I have a dataframe with column A and B. I want to create a third column which is square root of the sum of squares of two columns.</p>
  
  <p>Below is my sample data:</p>
  
  <pre><code>A   B
  10  7
  10  8
  9   8
  10  11
  13  5
  3   0
  12  8
  12  9
  11  10
  10  11
  </code></pre>
  
  <p>Below is the code that I have tried:</p>
  
  <pre><code>df['vib_mot_sqrt'] = df[(np.sqrt(df['X']**2) + (df['index']**2))]
  </code></pre>
  
  <blockquote>
    <p>KeyError: "None of [Float64Index([6.0, 6.0, 11.0, 15.0, 16.0, 33.0, 42.0, 55.0, 73.0, 87.0], dtype='float64')] are in the [columns]"</p>
  </blockquote>