title: Calculating cosine similarity across column in pandas
body: <p>I am new to pandas and i have these 2 series.</p>
  
  <p><code>train['description_1']</code> and <code>train['description_2']</code> are series. They each contain a vector for each row. </p>
  
  <pre><code>from scipy.spatial.distance import cosine
  item3 = pd.concat([train['description_1'], train['description_2']], axis = 1)
  cos_vec = item3.apply(cosine)
  </code></pre>
  
  <p>Exception would be <code>TypeError: ('cosine() takes exactly 2 arguments (1 given)', u'occurred at index description_1')</code>    </p>
  
  <p>Each element of train['description'] contains a vector. </p>
  
  <p>I am expecting something like this </p>
  
  <pre><code>train_1       train_2
  [1.0,2.0]     [2.0,3.0] 
  [2.0,2.0]     [3.0,2.0] 
  
  
  Output:
  
  cos_sim 
  x
  y
  </code></pre>