79137702

Date: 2024-10-29 14:46:20
Score: 0.5
Natty:
Report link

The xl()-function returns a Pandas dataframe.

Hence, it can be iterated over by the following (adapted from this post):

arr=xl("B2:B3")
tot=1
for index, row in arr.iterrows():
    tot*=(1+row[0])
tot-1

or, as looping each row isn't really necessary when it is a df, the same can be done by

arr=xl("B2:B3")
tot=(arr[0]+1).product()
tot-1
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: RuneS