I have a quick simple question. I have a dataframe such as this
Column_4 Column_4
0 Data Data
1 102832 79639
2 50034 21058
3 38230 18963
4 34503 14216
What I want to do is divide the values in each column by a scalar value that is derived from another dataframe, such as this.
0 1
0 103000.0 500.0
So this is what I want to happen:
Column_4 Column_4
0 Data Data
1 102832/103000.0 79639/500.0
2 50034/103000.0 21058/500.0
3 38230/103000.0 18963/500.0
4 34503/103000.0 14216/500.0
I know you can divide a dataframe by scalar values, and even dataframes by values in other dataframes (by using the index to match them); however I have yet to find a way to divide a column of a dataframe by a scalar value that is obtained from another dataframe using pandas such as the above example.
Edit: There was a string in my column (Data), so I have removed that. This is the new dataframe.
Column_4 Column_4
1 102832 79639
2 50034 21058
3 38230 18963
4 34503 14216
5 34219 11450