Python: extrapolate a trend using 2 or more data points
<p>I need to be able to extrapolate, using 2-n data points, a curved trend line which can then be 'queried'.  In my head it would look a bit like this (the blue line):</p>

<p><img src="http://www.generationaldynamics.com/ww2010/dpdjx1930-100801.gif" alt="Example graph"></p>

<p>This is for a 'calories calculator' - I have data points regarding the amount of calories burned for an activity based on a certain weight: e.g. if you're 65kg, you'll burn around 420 calories, if you're 70kg, you'll burn 480 calories, if you're 75kg, you'll burn 550 calories, etc. etc.  One axis would be for calories, the other for weight.</p>

<p>Obviously if I wanted to find out the amount of calories burned for a weight where I don't have a data point, I would need a trend line to 'query', which brings me on to the second part of my question: how would I go about doing this?</p>

<p><strong>In summary:</strong></p>

<ul>
<li>How do I extrapolate a trend line in Python?</li>
<li>How do I 'query' this trend line to get estimates based on a point on this trend line?</li>
</ul>
