第4大题改

4_1和4_2作为训练集

import pandas as pd

train1 = pd.read_table('question_4_1.txt', sep='\t', header=None)

train2 = pd.read_table('question_4_2.txt', sep='\t', header=None)

train = pd.concat([train1, train2], axis=0)

names = ['text','sentiment']

train.columns = names

你可能感兴趣的:(第4大题改)