问题 I have code like this x_train=data['TOKEN'].loc[:2] y=data['label'].loc[:2] x_test=data['TOKEN'].loc[3:] that contain 3 Data training 1 class each class(-1),(0),(1) and 1 data test #TFIDF training tfidf= TfidfVectorizer(smooth_idf=False,norm=None) x_tfidf2 = tfidf.fit_transform(x_train) tfidfframe_train = pd.DataFrame(x_tfidf_train,columns=tfidf.get_feature_names()) #the output of tfidfframe_train a b c d e f 0 0.0 0.0 0.0 1.477 1.477 1.0 -> class -1 data train doc1 1 0.0 0.0 1.176 0.0 0.0 1