Transforming Data into the Time Series Format