UBS Interview Question

How to connect two dataframes with oneliner