[Tutor] Python OLS help

Michael Selik michael.selik at gmail.com
Tue May 31 20:03:18 EDT 2016


On Tue, May 31, 2016 at 5:45 PM Vadim Katsemba <vkatz722 at gmail.com> wrote:

> I typed in lm = smf.ols(formula='LATITUDE~DIAMETER',data=dataf).fit(), and
> I ended up getting this error: ValueError: For numerical factors,
> num_columns must be an int.
>

You may be using an old version of Patsy, the module that allows you to
specify your OLS formula like R-lang does. What version of patsy are you
using? This seems to have been a problem with Patsy v0.4.0 and was fixed in
v0.4.1 (as per an email thread I read [0])

[0] https://groups.google.com/forum/#!topic/pystatsmodels/KcSzNqDxv-Q


More information about the Tutor mailing list