-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'date' #106
Comments
It's a little hard to help you diagnose your issue without your code. Could you please give us a reproducible example? |
just open https://github.com/quantopian/empyrical/blob/master/empyrical/utils.py#L436 and remove lines 436 and 437 |
Please see https://github.com/quantopian/empyrical#deprecated-data-reading-via-pandas-datareader Since #97 we have deprecated all data-reading functionality from |
and change: I made a PR, let's see if Quantutopian will merge it... |
KeyError: 'date'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/empyrical/utils.py in get_symbol_returns_from_yahoo(symbol, start, end)
435 px = web.get_data_yahoo(symbol, start=start, end=end)
--> 436 px['date'] = pd.to_datetime(px['date'])
437 px.set_index('date', drop=False, inplace=True)
Date is index field
Index(['High', 'Low', 'Open', 'Close', 'Volume', 'Adj Close'], dtype='object')
The text was updated successfully, but these errors were encountered: