feature_Train = numpy.array([ Votes_Train[c].cat.codes for c in Votes_Train.columns if c != label_col]).T print(feature_Train.shape)