I have this dataframe:
Receipt Description Card Member Account Cost
200a apple adam 08203928 $2
20022a pear bob 08203228 $7
202a orange alice 0820321228 $8
I want to check if a value in the description column contains a specific substring. For example the first row (adam) has the description of "apple". I want to check to see if the substring "appl" exists in this description column.
If so I then want to create a new column named Data which would then store the value need more apples. If no substring of "appl" is found I dont want to store anything in this column.
This is what the expected new dataframe would look like.
Receipt Description Card Member Account Cost **Data**
200a apple adam 08203928 $2 need more apples
20022a pear bob 08203228 $7
202a orange alice 0820321228 $8