UBS interview question

How to connect two dataframes with oneliner