import pandas as pd
import numpy as np
import statsmodels.api as sm
df = pd.DataFrame([[0, 1], [8, 3]],
index=['cat', 'dog'],
columns=['weight', 'height'])
Y = df['weight']
X = df['height']
X = sm.add_constant(X)
model = sm.OLS(Y, X, missing = 'drop')
The code can run, but I got this warning message
/opt/conda/lib/python3.7/site-packages/statsmodels/tsa/tsatools.py:130: FutureWarning: In a future version of pandas all arguments of concat except for the argument 'objs' will be keyword-only
x = pd.concat(x[::order], 1)
How can I modify the code to silence the warning – and to accommodate future pandas versions? Thanks!