Training dataset
df_table = pd.DataFrame()
df_table["A"] = [0.2, 0.2, 0.2, 0.2, 0.2,
0.4, 0.4, 0.4, 0.4, 0.4,
0.6, 0.6, 0.6, 0.6, 0.6,
1.5, 1.5, 1.5, 1.5, 1.5,
2.5, 2.5, 2.5, 2.5, 2.5,
3.0, 3.0, 3.0, 3.0, 3.0]
df_table[450] = [1, 5, 20, 30, 40,
1, 5, 8, 10, 20,
1, 5, 10, 15, 25,
2, 7, 15, 20, 30,
2, 7, 15, 20, 35,
2, 8, 20, 30, 40]
df_table[500] = [3, 15, 25, 60, 80,
4, 10, 15, 20, 30,
5, 10, 15, 30, 40,
5, 10, 20, 30, 45,
7, 10, 20, 35, 50,
8, 15, 25, 60, 80]
if the input value of is A = 0.2, and temperature = 476, I want to get the value from the column closest to 476, in this case value from the 500 which will be 3.
Similarly, how can I get both values from 450 and 500. For this instance 1 and 3. So that would be value from the closest smaller column and closest higher column.