Detrends Transformation of a dataset