title: How do I get linalg value within dataframe
body: <p>I am trying to get linalg value for each index in DataFrame 'df'.</p>
  
  <pre><code>param_array = np.array([[a1, b1, c1]])
  df['linalg'] = df.loc[:,['a','b','c']].apply(lambda x: np.linalg.norm(param_array - x))
  </code></pre>
  
  <p>but it tells error message as below</p>
  
  <pre><code>ValueError: ('operands could not be broadcast together with shapes (1,3) (99,) ', 'occurred at index mileage')
  </code></pre>
  
  <p>how can I add 'linalg' column with each calculated value?</p>
  
  <p>Sample input:
  param_array</p>
  
  <pre><code>[[1.16603492 0.56862718 0.53061338]]
  </code></pre>
  
  <p>df</p>
  
  <pre><code>index a  b  c
  62    0.398031    -0.711471        0.568627
  63    0.416261    -0.508861        0.868064
  64    0.934160    -0.885950        0.868064
  65    0.416261    -0.778950        0.568627
  66    0.416261    -0.973966        0.269191
  67   -0.490270     0.573738       -0.629119
  68    1.152092    -0.943765        0.868064
  69    0.445264    -0.704395        0.568627
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>index a  b  c linalg
      62    0.398031    -0.711471        0.568627        "results of np.linalg.norm(param_array - 'array of a/b/c')"
      63    0.416261    -0.508861        0.868064        "results of np.linalg.norm(param_array - 'array of a/b/c')"
  </code></pre>