character causing syntax issue with statsmodel
问题 I'm trying to fit a linear model to some data using the code below. I'm getting the error below. I think the error has an issue with the '%' in the field name. I have many fields in my data with this naming convention. Does anyone know how to solve this issue with statsmodel? code: mod = ols('fieldA%'+'~'+'fieldB',data=smp_df).fit() error: Traceback (most recent call last): File "C:\Users\username\AppDataPython\envs\py36\lib\site-packages\IPython\core\interactiveshell.py", line 3267, in run