INterpolating in SCIPY

I have DATA on x and y axes and the output is on z

for example
y = 10
x = [1,2,3,4,5,6]
z = [2.3,3.4,5.6,7.8,9.6,11.2]

y = 20
x = [1,2,3,4,5,6]
z = [4.3,5.4,7.6,9.8,11.6,13.2]

y = 30
x = [1,2,3,4,5,6]
z = [6.3,7.4,8.6,10.8,13.6,15.2]

how can i find the value of z when y = 15 x = 3.5

I was trying to use scipy but i am very new at it

Thanks a lot for the help

vibhor

I never used Scipy but the result is 7.7.
you can do it manually this way, or you can work with some arrays and do a script for this.
First interpolate the value for z based on x=3.5 and y=10 for which z=(5.6+7.6)/2 so z=6.6)
now you interpolate the value for z based on x=3.5 and y=20 for which z=(7.8+9.8)/2 so z=8.8). now your value is between 6.6 and 7.7 and because y=15 you have (6.6+8.8)/2
you should figure out why divided by 2(it’s your math quiz anyway).

Cheers!