I have a dataframe and I would like to break down x in intervals of 3, and for each apply curve fit\' to y. What is the most efficient way to do it? So far I did it manually but