For my data analysis I wish to get linear fits for different segments of the data. Since its a large data set I want python to calculate the lineair fits and the corresponding s