Pandas DataFrame: Complex linear interpolation
I have a dataframe with 4 sections Section 1: Product details Section 2: 6 Potential product values based on a range of simulations Section 3: Upper and lower bound for the input parameter to the simulations Section 4: Randomly generated values for the input parameters Section 2 is generated by pricing the product at equal intervals between the upper and lower bound. I need to take the values in Section 4 and figure out the corresponding product value. Here is a possible setup for this dataframe: table2 = pd.DataFrame({ 'Product Type': ['A', 'B', 'C', 'D'], 'State_1_Value': [10, 11, 12, 13],