Linear Regression on Timeseries data

I am working through a technical assessment and one part is asking for a tiny bit of data science. They give me the implementation and I am a little confused about it. That said, the thing I am trying to figure out is how to calculate the linear regression of a set of values with a corresponding time stamp. I don’t know a lot about LR but I know I need to fit x and y datasets.

Can anyone point me in the right direction?

This sounds similar to the Sea Level Predictor project. In that project, a linear regression is calculated with scipy.stats.linregress(). You call it with an x and y array (pandas series, numpy array, etc.) and it will calculate a line of best fit and return the slope, intercept, and some statistics about the line.

this helped me - scipy.org