How to trim the line, to take a numerical derivative?

There is a line
tQETuI.png
broke it into three parts, not to get confused
It must be straighten so that it was possible to build the numerical derivative.
How to do it? MB there is some function somewhere?
April 4th 20 at 13:15
2 answers
April 4th 20 at 13:17
If it is a straight, linear regression and school mathematics textbook to help you.
this is not a direct.(( - hertha_Koelpin commented on April 4th 20 at 13:20
April 4th 20 at 13:19
Filter the market noise. In scipy a lot of things on this subject there is.

Find more questions by tags Python