I'm a rookie in Python and I hope to find here help for my text analyse project. I'm trying to tokenize several text elements which I imported from an excel in python spyder. Each text element is in a seperate row.
I tried this code but it doesen't work.
import spacy
df = txtdf.head()
df2 = df['Textelements']
from spacy.lang.de import German
nlp = German()
doc = nlp(df2)
tokens = [token.text for token in doc]
print(tokens)
And I get this error in the console:
ValueError: [E1041] Expected a string, Doc, or bytes as input, but got: <class 'pandas.core.series.Series'>