WillKoehrsen / Data-Analysis

Data Science Using Python
https://medium.com/@williamkoehrsen/
MIT License
5.16k stars 3.64k forks source link

Not able to run stocker #11

Closed manav157 closed 5 years ago

manav157 commented 6 years ago

Hi i have already installed all the packages required but i am not able to run this code on jupyter. image please help me where i am lagging behind. It would be very helpful.

manisaivecha341 commented 6 years ago

rather than a jupyter notebook try to run a interactive python program of stocker on your command interface .. it worked with mine.

elessarrr commented 6 years ago

@manisaivecha341 could you elaborate? What do you mean by interactive python program? Thanks

BoomPakorn commented 6 years ago

I try to run this Stocker Analysis Usage.ipynbI can't plot_stock() because of date or somethings how to fix

screenshot 2018-05-21 13 45 26

manisaivecha341 commented 6 years ago

See @elessarrr can u mention your specifications of your system and python idle

willm78 commented 6 years ago

@manav157 Not sure if this is your issue or not, but you forgot to capitalize a word.

Where you have: from stocker import stocker should be: from stocker import Stocker

mdoliner commented 6 years ago

+1 to @BoomPakorn seems like there's an issue at all places where pandas boolean date filtering is being used

BoomPakorn commented 6 years ago

I found the way to fix it. just remove .date() after start_date & end_date in stocker

screenshot 2018-05-23 09 29 14

mdoliner commented 6 years ago

I thought that would fix it too, because if I run the operations that make up .plotStock() by hand they work when you remove .date(), but when I run the actual .plotStock() method, still doesn't appear to be working

screen shot 2018-05-23 at 11 03 09 am

WillKoehrsen commented 6 years ago

Could this be an issue with the newest version of Pandas (version 0.23)? It looks like there were changes made to the datetime module: pandas 0.23 changes.

fallen293 commented 6 years ago

@WillKoehrsen That is definitely the issue. I used pip install pandas==0.22.0 and that fixed my issues Good catch!

WillKoehrsen commented 6 years ago

That's good to hear. I will update Stocker to reflect the newest version of Pandas when I get the chance.

long4glasgow commented 6 years ago

I have encountered the same issue of date error as the @mdoliner, pandas == 0.22.0, not sure what is causing this error.

WillKoehrsen commented 5 years ago

I'm going to close this because the original issue has been resolved. There still appear to be some errors with datetimes, but I think that is a matter of using the correct version of pandas.

rajeev-chaudhary commented 4 years ago

ImportError: cannot import name 'StringIO' from 'pandas.compat' (C:\Users\RAJEEV CHOUDHARY\anaconda3\lib\site-packages\pandas\compat__init__.py)

This messgae is displaying after installation of stocker.