kompiangg's picture
init commit
e316253
raw
history blame
182 Bytes
from sklearn.feature_extraction.text import TfidfVectorizer
def create_tfidf(dataset, feature, label):
tfidf = TfidfVectorizer()
return tfidf.fit(dataset[feature].astype(label))