Skip to content
Advertisement

Remove rows from dataframe based on cervine string list of values

I am trying to remove rows from a dataframe based on multiple conditions, so I defined two lists of the keywords that I want to check before the row is deleted. the condition is when it matches the first list delete unless it contains one of the keywords in the second list.Sample Input and expected Output. INPUT AND OUTPUT

JavaScript

JavaScript

Advertisement

Answer

You can try:

JavaScript

Edit (2021-06-30):

Base on the sample input and output, you can get the result by:

JavaScript

Result:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement