Transformations
Statistical Trend Lines
Use this when you want to add a best-fit trend line alongside your raw data.
Regression — DF_REGRESSION
Fit a linear or curved trend line to your data and add the predicted values as a new column.
Use this when: you want to visualise the underlying trend in noisy data, or project where a value is heading.
Available types: linear (straight trend line), polynomial (curved trend line).
Before
Code
After — adding a linear trend column
Code
Code
For a curved trend, use "type": "polynomial" and optionally set "degree" (default is 2).
Last modified on