I have two dataframes, one of them is just a single row, and I would like to transform each of the columns in the first one with the values in the single row in some fashion. How do I do this? Here's what I want to achieve:
df1 = pl.DataFrame({'c1': [2,4,6],'c2': [20,40,60],'c3': [10,20,30]})
df2 = pl.DataFrame({'c1': [2],'c2': [20],'c3': [10]})
df = df.select([
pl.col('c1')/df2['c1'],
pl.col('c2')/df2['c2'],
pl.col('c3')/df2['c3'],
])
Now, imagine I have hundreds of columns. Above code doesn't scale, how do I do this best? Thanks!