Giter VIP home page Giter VIP logo

Comments (9)

davidastephens avatar davidastephens commented on May 10, 2024

Thanks. I'll take a look at this issue. Likely just need to add a check for empty tables.

from pandas-datareader.

davidastephens avatar davidastephens commented on May 10, 2024

#24 should fix it. Please reopen if you still have issues.

from pandas-datareader.

aisthesis avatar aisthesis commented on May 10, 2024

Is this set up to get built with each new pandas release? Or is pandas-datareader intended to become a completely separate package? If pandas-datareader does get merged into pandas, how long do you expect it to take for a new pandas release to include your fix?

from pandas-datareader.

jorisvandenbossche avatar jorisvandenbossche commented on May 10, 2024

It is intended that pandas-datareader can have it's own release schedule as a separate package, so independent of pandas itself. So the io.data module in pandas will just depend on the version you have installed of pandas-datareader

from pandas-datareader.

aisthesis avatar aisthesis commented on May 10, 2024

I'm not sure I follow you here. In various spots (pypi, README at root of pandas-datareader), it says that to use pandas-datareader you first have to install it, then in code you import using from pandas_datareader import data, wb. So, presumably where I have in my code from pandas.io.data import Options, I should write from pandas-datareader.data import Options. Then the name Options is going to be the class defined in whatever version I have of pandas-datareader.

But are you saying this: Supposing I have pandas 0.5.1 installed and pandas-datareader 0.1 then when I write from pandas-datareader.data import Options, the class definition in pandas-datareader 0.1 will be the one used, overriding the one in pandas 0.5.1? That doesn't seem like it should be the case, but maybe I'm missing something.

Also, what if you don't have pandas-datareader installed? Will future releases of pandas pick up the changes in pandas-datareader with some kind of lag? Or is pandas.io.data just frozen in its current state? If pandas.io.data isn't frozen, roughly how long will it take for a new release of pandas to have the latest changes in pandas-datareader?

from pandas-datareader.

jorisvandenbossche avatar jorisvandenbossche commented on May 10, 2024

We are still in the process of migrating it to a separate package, so that's why it is probably not yet that clear everywhere.
But indeed, the intention is that, to keep backwards compatibility, when you import it from pandas, you will get the version of pandas-datareader (which is then a dependency for pandas if you want to use these functions). But the version in pandas-datareader will, to start with, the same as now in pandas, and in the future receive the bugfixes/improvements. And after a transition period, the code in pandas will be removed and you will have to have pandas-datareader installed.

from pandas-datareader.

aisthesis avatar aisthesis commented on May 10, 2024

Verified the fix for both Python 2.7 and Python 3.4 . Thanks!

from pandas-datareader.

aisthesis avatar aisthesis commented on May 10, 2024

It looks like this issue needs to be re-opened. Using pandas 0.15.1 I'm repeatedly getting a successful pull where I'm getting a failure using pandas_datareader 0.1.0:

>>> import pandas as pd
>>> pd.__version__
'0.15.1'
>>> from pandas.io.data import Options
>>> spwr = Options('spwr', 'yahoo')
>>> sopt = spwr.get_all_data()
>>>

But at the same time in a virtual environment using pandas 0.16.0 and pandas_datareader 0.1.0 this operation fails with similar message to what I was getting before:

>>> import pandas_datareader as pdr
>>> pdr.__version__
'0.1.0'
>>> from pandas_datareader.data import Options
>>> spwr = Options('spwr', 'yahoo')
>>> sopt = spwr.get_all_data()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/marshallfarrier/venv/pnlocal/lib/python2.7/site-packages/pandas_datareader/data.py", line 1118, in get_all_data
    return self._get_data_in_date_range(dates=expiry_dates, call=call, put=put)
  File "/Users/marshallfarrier/venv/pnlocal/lib/python2.7/site-packages/pandas_datareader/data.py", line 1132, in _get_data_in_date_range
    frame = self._get_option_data(expiry=expiry_date, name=name)
  File "/Users/marshallfarrier/venv/pnlocal/lib/python2.7/site-packages/pandas_datareader/data.py", line 751, in _get_option_data
    frames = self._get_option_frames_from_yahoo(expiry)
  File "/Users/marshallfarrier/venv/pnlocal/lib/python2.7/site-packages/pandas_datareader/data.py", line 668, in _get_option_frames_from_yahoo
    option_frames = self._option_frames_from_url(url)
  File "/Users/marshallfarrier/venv/pnlocal/lib/python2.7/site-packages/pandas_datareader/data.py", line 705, in _option_frames_from_url
    raise RemoteDataError('Received no data from Yahoo at url: %s' % url)
pandas_datareader.data.RemoteDataError: Received no data from Yahoo at url: http://finance.yahoo.com/q/op?s=SPWR&date=1431043200
>>>

As before, at the time of the function call, there is no data in the calls table when you pull up the link given in the error message.

Please fix this for real, so I can unfreeze my pandas version for the dependent library I'm maintaining!

from pandas-datareader.

davidastephens avatar davidastephens commented on May 10, 2024

Its fixed in the master version of both pandas and pandas-datareader.

I'll do a new release of pandas-datareader so that it will be in the pip download.

from pandas-datareader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.