I'm trying to make a list based on a data frame, where if a string is found under the "question" column, it is added. I seem to have made it work with a singular string, but I am not sure how to apply this to a list.
#pd.set_option("display.max_rows", None, "display.max_columns", None)
pd.set_option('display.max_colwidth', -1)
jp = pd.read_csv('jeopardy.csv', delimiter = ",")
jp = jp.rename(columns = {'Show Number': 'show_number', ' Air Date': 'air_date', ' Round': 'round', ' Category': 'category' , " Value": 'value', ' Question': 'question', ' Answer': 'answer'})
#print(jp.head())
print(jp.info())
jp_df = jp[jp.apply(lambda row: 'King' in row['question'], axis = 1)].reset_index(drop=True)
print(jp_df.info())