OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Completing the runoff triangle calculation

  • Thread starter Thread starter Karthik Amballa
  • Start date Start date
K

Karthik Amballa

Guest
I have 2 data frames df1 has many rows n columns, but the df is empty from the bottom and its like a matrix, df1 here is a sample of it and df2 has only one row with values, here is a sample for it df2, i need to multiply in such a way that the 1st value from df2[1.45564] should be multiplied by the last value of df1[9212956], that should be the first value in the new df, then the next value multiplied should be the previous calculation and df2 2nd value [1.47087], and the loop should go on for the entire data frame, NOTE: The loop should start from the bottom. For the 2nd row from the bottom df1 [11040531] should be multiplied by df2 2nd value [1.47087], and this logic needs to continue. Thank you for any help:)

df.iloc[-1,0] *result_df.iloc[0,1]
<p>I have 2 data frames df1 has many rows n columns, but the df is empty from the bottom and its like a matrix, <a href="https://i.sstatic.net/0kYXsWCY.png" rel="nofollow noreferrer">df1</a> here is a sample of it and df2 has only one row with values, here is a sample for it <a href="https://i.sstatic.net/Z4XWRIVm.png" rel="nofollow noreferrer">df2</a>, i need to multiply in such a way that the 1st value from df2[1.45564] should be multiplied by the last value of df1[9212956], that should be the first value in the new df, then the next value multiplied should be the previous calculation and df2 2nd value [1.47087], and the loop should go on for the entire data frame, NOTE: The loop should start from the bottom. For the 2nd row from the bottom df1 [11040531] should be multiplied by df2 2nd value [1.47087], and this logic needs to continue.
Thank you for any help:)</p>
<p>df.iloc[-1,0] *result_df.iloc[0,1]</p>
 

Latest posts

Online statistics

Members online
0
Guests online
2
Total visitors
2
Ads by Eonads
Top