title: Xgboost-ValueError: Please reshape the input data X into 2-dimensional matrix in python
body: <p>I use XGBoost Algortihm for text mining but in below code I keep getting an error.</p>
  <pre><code>from xgboost import XGBClassifier
  from numpy import *
  xgb=XGBClassifier()
  xgb.fit(df['doc_vector'],df.cat1)
  </code></pre>
  <p>How can I fix this? Thank you.
  <a href="https://i.stack.imgur.com/077hE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/077hE.png" alt="enter image description here" /></a></p>
  <p>Below types and print of the objects</p>
  <p><a href="https://i.stack.imgur.com/rSFyu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rSFyu.png" alt="enter image description here" /></a></p>