I have a CSV file with columns such as:
df =
title body
A yellow, gree
B blue, red
C red, green
D grey, blue
I would like to create a new dataframe with those rows that contain the word red:
df_New =
title body
B blue, red
C red, green
My code so far looks like this:
import pandas
Documents = pandas.read_csv(df.csv)
words = ['red', 'Red']
Df_New = Documents.str.match('(words)')