Skip to content

Conversation

addisonlynch
Copy link
Contributor

Fixes #486. Certain Morningstar (index) tickers now use np.nan to indicate empty volume data. Thanks @ggomarr.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • added entry to docs/source/whatsnew/vLATEST.txt

@addisonlynch
Copy link
Contributor Author

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.

@addisonlynch
Copy link
Contributor Author

addisonlynch commented Feb 17, 2018

@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.

@bashtage
Copy link
Contributor

I restarted but it looked like there were failures against latest Pandas.

@addisonlynch
Copy link
Contributor Author

@bashtage thanks. Looks like the second round passed.

if jsondata["VolumeList"]:
volumes = jsondata["VolumeList"]["Datapoints"]
else:
volumes = [np.nan] * 1000000
Copy link
Contributor

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

@@ -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)})
Copy link
Contributor

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...

@bashtage bashtage merged commit 9acc0d0 into pydata:master Feb 18, 2018
@bashtage
Copy link
Contributor

Thanks

bashtage pushed a commit to bashtage/pandas-datareader that referenced this pull request Apr 13, 2018
Repaired Morningstar volume for indicies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Morningstar queries to some tickers fail because the API returns no volumes
2 participants