I have scipy.sparse.csr.csr_matrix object size of (118723, 20748) when I am trying to convert it into an array by using toarray() function it giving me *** MemoryError:
Please find below my code:
tfidf = TfidfVectorizer(min_df=5,stop_words='english')
X = tfidf.fit_transform(sentance_list)
sentanceDF=pd.DataFrame(X.toarray(),columns=tfidf.get_feature_names())
Error:
*** MemoryError:
Please help me to resole this issue.