The below table having 1000 rows but here let's consider 3 rows:
| Date | B | C |
|---|---|---|
| 2022-07-24 | 100 | 1234 |
| 2021-02-01 | 200 | 6789 |
| 2020-04-30 | 300 | 4324 |
where m is the number of rows in the dataset and n is the number of columns. i varies along rows and j varies along the column.
For each row of Column B and C, the formula I tried applying is:
df['B'] = df1['B'] / np.sqrt((df['B'].pow(2)).sum())
df['C'] = df1['C'] / np.sqrt((df['C'].pow(2)).sum())
I want to write the same code using Python.
