So I would like to have my explanatory variable air quality and smoking status and smoking status squared as part of my linear regression. So I can easily get around this by adding the values in the .csv file I am reading from but I would like to manipulate it using python. Is there a way to manipulate smoking status by squaring it and utilizing part of the Mulitple Line Regression? My csv file only have 3 column consisting of air quality, smoking status, and asthma.
x = df[['Air_quality', 'Smoking_Status']]
y = df['Asthma_Death_Rate']
x = sm.add_constant(x)
est = sm.OLS(y,x).fit()