Select Pandas rows with regex match
问题 I have the following data-frame. and I have an input list of values I want to match each item from the input list to the Symbol and Synonym column in the data-frame and to extract only those rows where the input value appears in either the Symbol column or Synonym column(Please note that here the values are separated by '|' symbol). In the output data-frame I need an additional column Input_symbol which denotes the matching value. So here in this case the desired output will should be like