NLP, Python, Scikit Learn.
resulting vectors: from sklearn.feature_extraction import DictVectorizer vectorizer = DictVectorizer(sparse=False) x_train = vectorizer.fit_transform(X['bow']) print(type(x_train)) #numpy.ndarray print(x_train) #[[ 15. 0. 10. ... 0. 0. 0.] # [662. 0. 430. ... 0. 0. 0.] # [316. 0. 143. ... 0. 0. 0.]