I have two dataframe and i need to use 1 as a reference to calculate the other values.
For example, I have df
like this:
Brand LB_ID Score
BMW Class 98
BMW Cost 99
VW Class 85
VW Cost 70
And the other df_lb
like this
Brand Total
BMW 56
VW 180
I need to use this formula to calculate another column: (Score(df) / Total(df_lb)) * 100
Normally I can use if-else conditions for such data but I have big data and it will take a lot time to write hundreds of if_else lines... I need an efficient way? Is there any?