i am trying to create 275 combinations of band math using SQRT and EXP formula from math function in Python colab. I shared a few of examples in the code. However its showing cannot convert the series to <class 'float'>".
Here is my data set
| B1 | B2 | B3 | B4 | B5 |
|---|---|---|---|---|
| 0.00439692 | 0.00669470 | 0.00709244 | 0.00138463 | 0.00082949 |
| 0.00268081 | 0.00442490 | 0.00932365 | 0.00363630 | 0.00259743 |
| 0.00595678 | 0.00964592 | 0.01350229 | 0.00312168 | 0.00195143 |
| 0.00741656 | 0.01167483 | 0.01178257 | 0.00185384 | 0.00109784 |
| 0.00640803 | 0.01088445 | 0.01627570 | 0.00365191 | 0.00229167 |
| 0.00942690 | 0.01618098 | 0.02002952 | 0.00289232 | 0.00172712 |
| 0.01083990 | 0.01778892 | 0.01892802 | 0.00260200 | 0.00153798 |
| 0.01165114 | 0.01894717 | 0.01811242 | 0.00237668 | 0.00139010 |
| 0.01467558 | 0.02165251 | 0.01496117 | 0.00174461 | 0.00100996 |
| 0.00936932 | 0.01354002 | 0.01100198 | 0.00245107 | 0.00175631 |
| 0.00737726 | 0.01144956 | 0.01004752 | 0.00152895 | 0.00090166 |
| 0.01039346 | 0.01539063 | 0.01099578 | 0.00144151 | 0.00084624 |
| 0.00864751 | 0.01287212 | 0.01001831 | 0.00149957 | 0.00088681 |
import numpy as np
import pandas as pd
# Load your dataset in Excel format
data = pd.read_excel("/content/B1_B11_S3_March - Copy.xlsx")
data
#BMF_log matric function
import math
SQRT = math.sqrt
#Band normal log matric formula (B287-B561)
#B12-B61
B12 = SQRT(data.B1 + data.B2)
B13 = SQRT(data.B1 - data.B2)
B14 = SQRT(data.B1 * data.B2)
B15 = SQRT(data.B1 / data.B2)
B16 = SQRT((data.B1 - data.B2) / (data.B1 + data.B2))
#Exponential formula
B12 = math.exp(data.B1 + data.B2)
B13 = math.exp(data.B1 - data.B2)
B14 = math.exp(data.B1 * data.B2)
B15 = math.exp(data.B1 / data.B2)
B16 = math.exp((data.B1 - data.B2) / (data.B1 + data.B2))
Any sort of help highly appreciated.
Many thanks in advance.