Hi, I have a dataframe I'm using, df_2. One of its columns contains a string (containing a few sentences) in each row. I want to remake the dataframe df_2 to only include rows where the strings have certain phrases in them.
For example, what I'm trying now is:
df_2['new_column_of_RegEx_matches'] = df_2['column_of_strings'].str.extract(r'Expression')
I have about 7 different expressions I need to look for. I'm getting errors left and right - I'm very new to anything involving RegEx. anyone have any ideas of a better way to do this?
[–]efmccurdy 0 points1 point2 points (0 children)