I'm new in Python and I'm trying to make a linear regression with a csv and I need to obtain the coefficients but I don't know how. This is what I have tried:
import statsmodels.api as sm
x = datos1['Ozone']
y = datos1['Temp']
x = np.array(x)
y= np.array(y)
model = sm.OLS(y, x)
results = model.fit()
print(results.summary())
Could you help me? Thanks.