[Chicago] Fun in learning ML
Carl Karsten
carl at personnelware.com
Mon Feb 2 21:19:23 CET 2015
the link I gave might be close, but I doubt it is an exact hit.
Where/why do you have this line: (why do you think it should work?)
from pandas.core.api import get_dummies
On Mon, Feb 2, 2015 at 1:46 PM, Randy Baxley <randy7771026 at gmail.com> wrote:
> Yep and my mind has a lot of fun with the idea of get_dummies.
>
> I cut off the traceback one line too soon. Maybe the link Carl gave will
> have an answer but just for completeness here is the traceback with that
> line included.
>
> >>> import statsmodels.api as sm
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.7/dist-packages/statsmodels/api.py", line
> 13, in <module>
> from .discrete.discrete_model import (Poisson, Logit, Probit,
> File
> "/usr/local/lib/python2.7/dist-packages/statsmodels/discrete/discrete_model.py",
> line 40, in <module>
> from pandas.core.api import get_dummies
> ImportError: cannot import name get_dummies
>
>
> On Mon, Feb 2, 2015 at 1:02 PM, Carl Karsten <carl at personnelware.com>
> wrote:
>
>> You didn't post the error, but earlier I thnk I see it:
>>
>> from pandas.core.api import get_dummies
>> ImportError: cannot import name get_dummies
>>
>> Assuming that is still the error..
>>
>> That says there is no get_dummies in pandas.core.api.
>>
>> I did find this:
>>
>>
>> http://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.reshape.get_dummies.html
>>
>> So something has get_dummies. but given the description I expect many
>> things have get_dummies.
>>
>> I'll let you find the docs that relate to what you are trying to do.
>>
>>
>>
>> On Mon, Feb 2, 2015 at 12:35 PM, Randy Baxley <randy7771026 at gmail.com>
>> wrote:
>>
>>> True that.
>>>
>>> The error comes up the same in terminal using python.
>>>
>>> >>> import statsmodels.api as sm
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> File "/usr/local/lib/python2.7/dist-packages/statsmodels/api.py", line
>>> 13, in <module>
>>> from .discrete.discrete_model import (Poisson, Logit, Probit,
>>> File
>>> "/usr/local/lib/python2.7/dist-packages/statsmodels/discrete/discrete_model.py",
>>> line 40, in <module>
>>> from pandas.core.api import get_dummies
>>>
>>>
>>> On Mon, Feb 2, 2015 at 12:12 PM, Carl Karsten <carl at personnelware.com>
>>> wrote:
>>>
>>>> good. pandas is installed and available.
>>>>
>>>> Now try the line or lines that are giving you trouble. Or if you need
>>>> to run your program to get an error, do that.
>>>>
>>>> The idea is very simple text based cause and effect.
>>>>
>>>> An IDE (PyCharm) will help you write code, but does not help us debug
>>>> your code. It just makes things harder for us, so when asking for help
>>>> with your code it is best to remove the IDE component.
>>>>
>>>> Unless you need help using the IDE, but that's a different problem than
>>>> how do I use pandas.
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Feb 2, 2015 at 11:56 AM, Randy Baxley <randy7771026 at gmail.com>
>>>> wrote:
>>>>
>>>>> user at freegeekchicago:~$ python
>>>>> Python 2.7.3 (default, Dec 18 2014, 19:10:20)
>>>>> [GCC 4.6.3] on linux2
>>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> >>> import pandas
>>>>> >>>
>>>>>
>>>>>
>>>>> On Mon, Feb 2, 2015 at 10:29 AM, Carl Karsten <carl at personnelware.com>
>>>>> wrote:
>>>>>
>>>>>> IDEs and screen shots make it harder to converse over email.
>>>>>>
>>>>>> Use the simple text based python repl so you can cut/paste text.
>>>>>> I don't have it installed, so this is what I get:
>>>>>>
>>>>>> carl at twist:~$ python
>>>>>> Python 2.7.6 (default, Mar 22 2014, 22:59:56)
>>>>>> [GCC 4.8.2] on linux2
>>>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>>
>>>>>> >>> import pandas
>>>>>> Traceback (most recent call last):
>>>>>> File "<stdin>", line 1, in <module>
>>>>>> ImportError: No module named pandas
>>>>>> >>>
>>>>>>
>>>>>> Do that and post the results.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, Feb 1, 2015 at 1:18 AM, Randy Baxley <randy7771026 at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> It was worth a try so I did it. I think Pandas is installed but on
>>>>>>> the path highlighted and in yellow at the top in fir.
>>>>>>> st attachment
>>>>>>> Second attachment shows where I think Python is looking for Pandas,
>>>>>>>
>>>>>>> On Sat, Jan 31, 2015 at 10:23 PM, Carl Karsten <
>>>>>>> carl at personnelware.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, Jan 31, 2015 at 10:02 PM, Randy Baxley <
>>>>>>>> randy7771026 at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> from pandas.core.api import get_dummies
>>>>>>>>> ImportError: cannot import name get_dummies
>>>>>>>>>
>>>>>>>>
>>>>>>>> pandas isn't installed right. (maybe not at all)
>>>>>>>>
>>>>>>>> my guess:
>>>>>>>> sudo easy_install pandas
>>>>>>>>
>>>>>>>> --
>>>>>>>> Carl K
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Chicago mailing list
>>>>>>>> Chicago at python.org
>>>>>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Chicago mailing list
>>>>>>> Chicago at python.org
>>>>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Carl K
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Chicago mailing list
>>>>>> Chicago at python.org
>>>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Chicago mailing list
>>>>> Chicago at python.org
>>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Carl K
>>>>
>>>>
>>>> _______________________________________________
>>>> Chicago mailing list
>>>> Chicago at python.org
>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Chicago mailing list
>>> Chicago at python.org
>>> https://mail.python.org/mailman/listinfo/chicago
>>>
>>>
>>
>>
>> --
>> Carl K
>>
>>
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> https://mail.python.org/mailman/listinfo/chicago
>>
>>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
>
--
Carl K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150202/9f7d8ce2/attachment-0001.html>
More information about the Chicago
mailing list