The adf test is a way to test whether the series is stationary, generally speaking, it is a test method in time series.
The ready-made tool statsmodels can be used in python to implement the adf test.
Methods and parameters:
statsmodels.tsa.stattools.adfuller(x, maxlag=None, regression='c', autolag='AIC', store=False, regresults=False)[source]¶ x: sequence, one-dimensional array maxlag: number of differences regression:{c: only constants, ct: There are constant items and trend items, ctt: There are constant terms, linear and quadratic trend terms, nc: no options} autolag:{aic or bic: default, then the number of lags is chosen to minimize the corresponding information criterium, None:use the maxlag, t-stat:based choice of maxlag. Starts with maxlag and drops a lag until the t-statistic on the last lag length is significant at the 95 % level.}