I need some help, I want to add a new column from parts of a existing column. I used str.contains but it gives me this error: unsupported operand type(s) for &: 'str' and 'int'
This is my code:
df['VVD'] = df[df['hashtags'].str.contains('rutte', 'mark', 'vvd')]
I know this is not the correct way of doing this but I'm struggling to find out how I can do this.
df['hashtags'].str.contains("rutte|mark|vvd")df?df['VVD'] = df[df['hashtags'].str.contains("rutte|mark|vvd")]