def _make_stem(job): global df df_str = df["stem"].astype(str) turk_stemmer = TurkishStemmer() length = df.shape[0] for index in range(length): _print_progress_bar(index, length, job=job, prefix=f"{job} Progress:", length=50) words = df_str[index].split() words = " ".join(turk_stemmer.stemWords(words)) df["stem"][index] = words
from snowballstemmer import TurkishStemmer tr_stemmer = TurkishStemmer() text = "Merhaba selam alperen" stemmed_words = tr_stemmer.stemWords(text) my_data = [" ".join(a) for a in stemmed_words] print(my_data)