I have a problem to create a loop on this data:
TCT
03/02/2020 105
03/03/2020 68
03/16/2020 55
03/08/2020 37
03/10/2020 36
got by high=df['Date'].value_counts().to_frame('TCT').head(5)
I would like to see if for each date some words are included in my dataframe. To search the word I am doing as follows:
word=['mum','old man','children','family]
sub_df.apply(lambda x : x.str.contains('|'.join(word))).any(1)]
where sub_df is defined as follows:
ref='03/02/2020'
sub_df=df[df['Date']==ref]
Example
Date Tt
03/02/2020 indent code by 4 spaces ...
03/02/2020 backtick escapes
...
03/03/2020 add language identifier to highlight code
03/03/2020 create code fences with backticks ` or tildes ~...
...
03/06/2020 to make links (use https whenever possible)
How could I include a loop on the above dates?
sub_dfdate columnas an index column,df.set_index(....)?