One of the frequently asked questions is, "Is it really important to scale the data?" or "When should we scale the data?" To be honest, there is no one-size-fits-all answer to this question. It really depends on the type of data you are working with and the algorithms being applied to it. An algorithm such as Support Vector Machine (SVM) converges very fast on normalized data. Another good reason to normalize the data is when the model is very sensitive to the magnitude and the units of two or different features are different. Here we are considering two important features: timestamp and price. And we are interested in finding how price changes over time.
The next step in our process is to preprocess the dataframe we created:
#pre-processing
scale=preprocessing.scale(price)
And then let's plot the scaled price:
plt.plot...