Hi all. I tried to change set(vocabulary) to list vocabulary), but errors showed. Can you help?
training_set['SMS'] = training_set['SMS'].str.split() vocabulary =  for sms in training_set['SMS']: for word in sms: vocabulary.append(word) vocabulary=set(vocabulary) vocabulary=list(vocabulary)
What I expected to happen:
vocabulary change to list type.
What actually happened:
AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas