Reduce Lambda In Python Dataframes Joins In Dbms