I’ve been trying to find out how to select a certain value based on multiple other values in the same tuple of a dataframe. The data looks like this(copied from the current dataframe)
DealID PropId LoanId ServicerId ServicerPropId
0 BAC98765 15 000015 30220144 010-002-001
1 BAC98765 16 000016 30220092 010-003-001
2 BAC98765 45 000045 30220155 010-045-001
3 BAC98765 48 000048 30220157 010-048-001
In SQL terms what I would like to accomplish is this:
Select ServicerPropId from dataframe
where DealID = 'BAC98765' and ServicerId = '30220144'
I’ve tried a few different ways to slice the data, but can’t seem to figure out how to get multiple selection criteria to work and return only 1 value into a variable.
Using the
maplets you put in any condition you want, in this case you can do this more simply (as pointed out in the comments by DSM)Which gives
(doc)