-
Notifications
You must be signed in to change notification settings - Fork 678
Repaired Morningstar volume for indicies #488
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
Conversation
Travis fails due to unrelated errors...since yesterday IEX Stock endpoints queries fail at random (Stats and Market data are OK). May want to add a warning for this-waiting for the provider's input first. |
@bashtage can you try restarting the Travis build on this? The conda install errored in 2.7/0.19.2 for some reason and the unrelated IEX provider issues should be resolved. That code wasn't really touched in this PR anyway. |
I restarted but it looked like there were failures against latest Pandas. |
@bashtage thanks. Looks like the second round passed. |
pandas_datareader/mstar/daily.py
Outdated
if jsondata["VolumeList"]: | ||
volumes = jsondata["VolumeList"]["Datapoints"] | ||
else: | ||
volumes = [np.nan] * 1000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be cleaner to set volumes to None
pandas_datareader/mstar/daily.py
Outdated
@@ -192,7 +196,10 @@ def _restruct_json(self, symbol, jsondata): | |||
else: | |||
pass | |||
if self.incl_vol is True: | |||
bardict.update({"Volume": int(volumes[p] * 1000000)}) | |||
try: | |||
bardict.update({"Volume": int(volumes[p] * 1000000)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then chck if volume is not None...
Thanks |
Repaired Morningstar volume for indicies
Fixes #486. Certain Morningstar (index) tickers now use
np.nan
to indicate empty volume data. Thanks @ggomarr.git diff upstream/master -u -- "*.py" | flake8 --diff