Re: [Tutor] Python OLS help

2016-06-01 Thread Michael Selik
You're welcome. A tip for the next bug: Google is pretty good at finding a
discussion of the error if you paste the whole phrase as your search terms.
In this case, I searched for "ValueError for numerical factors num_columns
must be an int" and found the relevant Google Group thread.

PS. I replied to the mailing list in case someone else has the same issue.
These emails are archived and searchable.


On Tue, May 31, 2016 at 10:07 PM Vadim Katsemba  wrote:

> I upgraded to patsy 0.4.1 and got the regression to run. Thank you very
> much for your help!
>
> On Tue, May 31, 2016 at 8:03 PM, Michael Selik 
> wrote:
>
>> On Tue, May 31, 2016 at 5:45 PM Vadim Katsemba 
>> 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
>>
>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python OLS help

2016-06-01 Thread Michael Selik
On Tue, May 31, 2016 at 5:45 PM Vadim Katsemba  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
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python OLS help

2016-05-31 Thread Alan Gauld via Tutor
On 31/05/16 16:30, Vadim Katsemba wrote:
> Hello there, I am having trouble running the Ordinary Least Squares (OLS)
> regression on Spyder. 

I had no idea what Spyder was but a Google search says its an IDE
somewhat akin to matlab or IPython... It also has a discussion group:

http://groups.google.com/group/spyderlib

You may find someone on this list who knows it but you will likely
get a better response on the spyder forum. This list is really
for core python language questions and although we try to be
helpful on other matters a dedicated forum is usually better.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Python OLS help

2016-05-31 Thread Vadim Katsemba
Hello there, I am having trouble running the Ordinary Least Squares (OLS)
regression on Spyder. 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. How am I supposed to run the OLS, is there another module I need to
use? Any help would be appreciated.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor