I have this dummy df:
columns = ['answer', 'some_number']
data = [['hello how are you doing','1.0'],
['hello', '1.0'],
['bye bye bye bye', '0.0'],
['no', '0.0'],
['yes', '1.0'],
['Who let the dogs out', '0.0'],
['1 + 1 + 1 + 2', '1.0']]
df = pd.DataFrame(columns=columns, data=data)
I want to output the rows with a word count greater than 3.
Here that would the rows 'hello how are you doing', 'bye bye bye bye', 'Who let the dogs out', '1 + 1 + 1 + 2'
My approach doesn't work: df[len(df.answer) > 3]
Output: KeyError: True
