How to use the following code in the flask framework, because when I use the following code, always get this error "AttributeError: 'numpy.ndarray' object has no attribute 'apply'"
message = message.apply(lambda x: ' '.join([word for word in x.split() if len(word) > 4]))
df?df['full_text']?dfwas intended to be a dataframe, but ended up being a dictionary, anddf['full_text']is a numpy array.