I want to find the name of the column in a dataframe ("categories") that contains a given string.
categories
Groceries Electricity Fastfood Parking
0 SHOP ELCOMPANY MCDONALDS park
1 MARKET ELECT Subway car
2 market electr Restauran 247
Say I want to search this entire dataframe for string "MCDO". The answer should be "Fastfood". I tried using str.contains but it doesn't seem to work for dataframes.
How can I achieve this? Thank you.