I have a pandas dataframe in which I want to divide each column by the same data series values for each row. Each column and the data series have the same length. The data series has only float numbers but some cells in the dataframe have NaNs.
I tried various things but somehow I cannot get it solved.
df = df.divide(data_series, axis=1)
Any suggestions? many thanks!