Source: https://www.statsmodels.org/dev/examples/notebooks/generated/stationarity_detrending_adf_kpss.html
from statsmodels.tsa.stattools import adfuller
def adf_test(timeseries):
print("Dickey-Fuller Test:")
print("\tNull hypothesis: The series has unit root.\n"