There is a table:
df = pd.DataFrame({"A": ["foo", "foo", "foo", "foo", "foo", ... "bar", "bar", "bar", "bar"], ... "B": ["one", "one", "one", "two", "two", ... "one", "one", "two", "two"], ... "C": ["2017", "2017", "2018", "2017", ... "2018", "2017", "2018", "2017", ... "2017"], ... "D": [1, 2, 2, 3, 3, 4, 5, 6, 7]}) It is necessary to put down the values ββ'Yes' in the column 'E' if the row A contains 'f' and the column 'B' has a value equal to 'one'
It is necessary to put down in the 'D' column the value 'No' if the execution of a certain function returns True.
It is necessary to put in the column 'F' values ββby the condition of the dictionary, if the dictionary key is included in the string, then return the value by key.