I'm new to pandas
, and I'm trying to create a data frame by pulling partial strings from one of the columns of the original
recipe_info = {
'title' = [ 'waffles', 'eggs', 'chocolate pancakes', 'pancakes']
'rating' = [ 3.4, 2.8, 3,6, 1.5 ]
my_recipes = pd.DataFrame(recipe_info)
recipe_info[recipe_info['title'].str.contains("pancake")]
desired output:
all_the_pancakes = {
'title' = ['chocolate pancakes', 'pancakes']
'rating' = [3.6, 1.5]
Thanks in advance...