I have a dataframe filled with twitter data. The columns are:
- row_id : Int
- content : String
- mentions : [String]
- value : Int
So for every tweet I have it's row id in the dataframe, the content of the tweet, the mentions used in it (for example: '@foo') as an array of strings and a value that I calculated based on the content of the tweet.
An example of a row would be:
- row_id : 12
- content : 'Game of Thrones was awful'
- mentions : ['@hbo', '@tv', '@dissapointment', '@whatever']
- value: -0.71
So what I need is a way to do the following 3 things:
- find all rows that contain the mention '@foo' in the mentions-field
- find all rows that ONLY contain the mention '@foo' in the mentions-field
- above two but checking for an array of strings instead of checking for only one handle
If anyone could help met with this, or even just point me in the right direction that'd be great.