I have text data, pandas data frame, which, i converted in to tf-idf vectors than using ML algorithm prediction done.so, how to merge results of xtest on indexes with xtest pandas data frame. I have performed train_test_split after on word embedding, not on pandas data frame. when i check:
array.index()
Numpy array has no attribute index
Shape of array is (3480,5000),when i try below code:
len(array.indices)
10480
assuming that pred is your predictions
it's numpy array, then you can df.merge preds as Series to main df