# Add a new column with column1 squared df['column2'] = df['column1']**2 # Run a regression model with educ, educ2, age, and age2 results = smf.ols('column3 ~ column1 + column2 + column4 + column5', data=df).fit()