I have a DataFrame (df1) with a dimension 2000 rows x 500 columns
(excluding the index) for which I want to divide each row by another DataFrame (df2) with dimension 1 rows X 500 columns
. Both have the same column headers. I tried:
df.divide(df2)
and
df.divide(df2, axis='index')
and multiple other solutions and I always get a df with nan
values in every cell. What argument am I missing in the function df.divide
?