I believe you can use the unintegrate functions for this.
In [276]: from statsmodels.tsa.arima_model import unintegrate, unintegrate_levels
In [277]: from statsmodels.tsa.arima_process import arma_generate_sample
In [278]: y = arma_generate_sample([1, -.2, -.1], [1, .7], nsample=1000)
In [279]: levels = [50]
In [280]: unstationary_y = unintegrate(y, levels)
In [281]: ARIMA(y, order=(2, 0, 1), trend='c').fit().summary()
Out[281]:
<class 'statsmodels.iolib.summary.Summary'>
"""
SARIMAX Results
==============================================================================
Dep. Variable: y No. Observations: 1000
Model: ARIMA(2, 0, 1) Log Likelihood -1394.270
Date: Thu, 18 Mar 2021 AIC 2798.540
Time: 08:41:11 BIC 2823.079
Sample: 0 HQIC 2807.866
- 1000
Covariance Type: opg
==============================================================================
coef std err z P>|z| [0.025 0.975]
------------------------------------------------------------------------------
const 0.0471 0.072 0.654 0.513 -0.094 0.188
ar.L1 0.2572 0.059 4.354 0.000 0.141 0.373
ar.L2 0.0264 0.049 0.540 0.589 -0.069 0.122
ma.L1 0.6636 0.048 13.887 0.000 0.570 0.757
sigma2 0.9509 0.045 21.368 0.000 0.864 1.038
===================================================================================
Ljung-Box (L1) (Q): 0.00 Jarque-Bera (JB): 1.56
Prob(Q): 0.99 Prob(JB): 0.46
Heteroskedasticity (H): 0.94 Skew: 0.06
Prob(H) (two-sided): 0.58 Kurtosis: 2.85
===================================================================================
Warnings:
[1] Covariance matrix calculated using the outer product of gradients (complex-step).
"""
In [282]: ARIMA(unstationary_y, order=(2, 1, 1), trend='t').fit().summary()
Out[282]:
<class 'statsmodels.iolib.summary.Summary'>
"""
SARIMAX Results
==============================================================================
Dep. Variable: y No. Observations: 1001
Model: ARIMA(2, 1, 1) Log Likelihood -1394.270
Date: Thu, 18 Mar 2021 AIC 2798.540
Time: 08:41:28 BIC 2823.079
Sample: 0 HQIC 2807.866
- 1001
Covariance Type: opg
==============================================================================
coef std err z P>|z| [0.025 0.975]
------------------------------------------------------------------------------
x1 0.0471 0.072 0.654 0.513 -0.094 0.188
ar.L1 0.2572 0.059 4.354 0.000 0.141 0.373
ar.L2 0.0264 0.049 0.540 0.589 -0.069 0.122
ma.L1 0.6636 0.048 13.887 0.000 0.570 0.757
sigma2 0.9509 0.045 21.368 0.000 0.864 1.038
===================================================================================
Ljung-Box (L1) (Q): 0.00 Jarque-Bera (JB): 1.56
Prob(Q): 0.99 Prob(JB): 0.46
Heteroskedasticity (H): 0.94 Skew: 0.06
Prob(H) (two-sided): 0.58 Kurtosis: 2.85
===================================================================================
Warnings:
[1] Covariance matrix calculated using the outer product of gradients (complex-step).
"""