Closed priestc closed 7 years ago
Once the Quandl data is returned in a pandas dataframe you have to look at pandas documentation to learn how to iterate through it. Quandl’s docs do not include usage of external packages.
This stack overflow topic should be helpful: http://stackoverflow.com/questions/16476924/how-to-iterate-over-rows-in-a-dataframe-in-pandas
You can also check out this primer: http://pandas.pydata.org/pandas-docs/stable/dsintro.html
Sorry, but I have to be frank. I'm sure the code is very good, but the documentation doesn't tell how to use the library. I want the data to get the exchange rate between BTC and LTC. I found this page on the Qualdt site:
https://www.quandl.com/data/BTCE/BTCLTC-BTC-LTC-Exchange-Rate
It tells me to use the code here:
When install the quandl python library and then paste that code into the shell, I get this:
The object that is returned seems to be a pandas DataFrame object. How can I iterate through the data found in this dataframe object? The documentation tells me a billion things about everything I don't want to know, but doesn't tell me what I need to know. All I need from the dataset is the average price, and the date.
I tried
But that doesn't work
I also tried to get the first line in the dataset:
But that gives me a key error. I then tried this:
but that gives me an attribute error
I did try to do
which does seem to return data, but there is no "Date" field, which makes the data useless for my use.
Why does this have to be so hard? Its very easy to download a csv file, iterate through it, but this quandl library makes it so much harder.
My suggestion is to modify the documentation near the top to explain how to use the most basic usage of this library, and that is downloading a single dataset (or datatable, or database or whatever you call it) and iterate over the data.