Pandas library / lambda function question

Job ID: 34465916

Budget: $30 – $250 USD

Looking for an expert to help me develop 1 line of code, that would need to:
1- From a column on dataframe that has dividers like # (Eg: aaaa#bbbb#cccc#dddd):
2- I need to split these data (using #)
3- Search in another dataframe in 2 collumns, 2 by 2 and in order and reverse:
(Eg: ([col1] = "dddddd" and [col2] = "ccccc") OR ([col1] = "cccc" and [col2] = "bbbb" ) OR ([col1] = "bbbb" and [col2] = "bbbb" )
4- If any of this dataset result has a third collumn with some Flag X "", we should input the number 10 in the first dataset

This is a complex structure and Im trying to not iterate in a loop / for because its taking forever, need some expert to help me build in real time here some solution, possibly using lambda function.
Related categories: Python Data Science NumPy Pandas