Try this: after applying the .as_matrix on your series object
Y.reshape((2,1))
Since .as_matrix() only returns a numpy-array NOT a numpy-matrix. Link here
2.1m questions
2.1m answers
60 comments
57.0k users