-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Predict fails for data frame #3987
Copy link
Copy link
Closed
Description
For the following script:
import pandas as pd
import statsmodels.formula.api as smf
df = pd.DataFrame([[3, 0.030], [10, 0.060], [20, 0.120]], columns=['BSA', 'Absorbance'])
model = smf.ols('Absorbance ~ BSA', data=df)
fit = model.fit()
fit.predict([0.25])
I get an error ending
PatsyError: Error evaluating factor: NameError: name 'BSA' is not defined
Absorbance ~ BSA
^^^
Is this expected?
In [3]: statsmodels.__version__
Out[3]: '0.8.0.dev0+ad70c62'
Reactions are currently unavailable