I have a dataframe that I would like to chunck- or rather run temporal sentiment analysis at different times. I am trying to measure how sentiment changes as part of user identity in extremist social movements. My data comes from Twitter.
How can I group users based on a date range? Say:
2021-01-01 23:59:15+00:00 - 2021-01-06 23:59:15+00:00
I tried to split the data using something like the code below but it does not constrain the data to specific date range
split_date ='2022-03-06 14:54:58+00:00'
cluster_data = df.loc[df['created_at'] <= split_date]