I have some data like shown in the table below. I want to figure out the point of change in the trend when a line is plotted with x=date_code and y= mass_weight. something like the attached image. There should be a constant decline or increase in weight_kg values after that point.
This is what my data looks like:
date_code weight_kg
0 354 215.16
1 355 502.59
2 356 568.15
3 357 328.20
4 358 824.07
I'm trying to figure out the change point in trend when we plot the data. There are so many weight_kg and date_code in the original data. I want to divide the date_code into specific periods and identify the change point in the weight_kg trend for each of the periods. You can access the data on the link below. I am using Python. The data shared is an example of a date_code period.
This is what the plot would look like:

Here's your solution
You can change the date
windowas you like.Output: