I am a beginner in need of some guidance.
I have a data frame that looks like the following (simplified example w. two columns, was imported from a CSV):
Price | Features
100 | {TV, wifi}
125 | {TV, wifi, "Air conditioning"}
110 | {wifi, "Wheelchair accessible", Sauna}
What I would like to do in this example is create a new column called "TV". This column would indicate TRUE if TV is listed as a feature, and FALSE if TV is not listed.
Price | Features | TV
100 | {TV, wifi} | TRUE
125 | {TV, wifi, "Air conditioning"} | TRUE
110 | {wifi, "Wheelchair accessible", Elevator} | FALSE
I have googled and found examples of how to do this based on conditions (if x = TRUE or x > 0)
but I'm unclear how to do it when I am looking for characters/phrases present in a variable.