How can I use multiple features in basic sentiment analysis in scikit-learn? I've tried to reduce the problem to it's absolute basics. Assume I have data (csv) as such:
label,text-column,gender-column,day-column
1,&quot;Sample positive text&quot;, female, 1
0,&quot;Sample negative text&quot;, female, 3
1,&quot;Another positive comment&quot;, male, 2
0,&quot;Angry text sample&quot;, male, 7

And I have this code that trains on label by using BoW (in this case tf-idf) on the text-column. I do a 70/30 train test split and all works well.
vec = TfidfVectorizer()
clf = MultinomialNB()
training_data = pd.read_csv('trainset.csv', delimiter=',')
text_tfidf = vec.fit_transform(training_data['text-column'])
# gen_tfidf = vec.fit_transform(training_data['gender-column'])
X_train, X_test, y_train, y_test = train_test_split(text_tfidf, training_data['label'], test_size = 0.3)
clf.fit(X_train, y_train)

However, for the life of me I simply cannot figure out how to use more than one feature. E.g. I want to use, say, both text-column and gender-column to train the model and see how that impacts accuracy, but I don't understand how to do that!
Am I missing something conceptually important here? Thank you.
You can one-hot encode the gender column and append it to your tfidf table.
gender = pd.get_dummies(training_data['gender-column'])
X = text_tfidf.join(gender)