title: pandas dot product only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
body: <p>I have this dataframe that is called <code>xTest</code> and this vector x
  both of type <code>numpy.ndarray</code>
  x length is 197
  <code>xtest</code>'s shape is (25000, 197).
  I am trying of generate a new column for <code>xTest</code> called prediction by getting the dot product of <code>xTest</code> and <code>x</code>.</p>
  <p>I tried:</p>
  <pre><code>xTest[&quot;pred&quot;] = np.dot(xTest,x)
  </code></pre>
  <p>and</p>
  <pre><code>xTest[&quot;pred&quot;] = xTest.dot(x)
  </code></pre>
  <p>I keep getting this error:
  <code>IndexError: only integers, slices (</code>:<code>), ellipsis (</code>...<code>), numpy.newaxis (</code>None<code>) and integer or boolean arrays are valid indices</code>.</p>
  <p><code>xTest</code> is already one hot encoded.</p>
  <p>UPDATE :
  Thanks to the great person who pointed it out below
  I was able to solve it like this</p>
  <pre><code>df = pd.DataFrame()
  df[&quot;pred&quot;] = np.dot(xTest,x)
  </code></pre>