Closed kade-robertson closed 3 years ago
I share your thought that the part you linked makes no sense, it should not return a DataFrame when the specified output format is JSON.
I submitted a pull request that should fix this issue.
Temporarily closing this issue due to a prolonged period since the last response was posted. Will re-open if needed.
Maybe this is expected, but I wasn't sure if this was intentional behaviour.
Other
TimeSeries
functions are able to function without relying onpandas
to produce the output. For example,TimeSeries.get_intraday(ticker = "MSFT")
will return the JSON data associated with that request. However,TimeSeries.get_symbol_search(keywords = "MSFT")
will fail, citing thatpandas
hasn't been installed, even though the default behaviour is to directly return the JSON data.I'm fairly certain it's because of this section of the JSON output handler: https://github.com/RomelTorres/alpha_vantage/blob/a70f110c4883ffe66f2d1f36571a61c2a90e563d/alpha_vantage/alphavantage.py#L239-L252
This block appears to be identical to the way the
pandas
output option handles lists. However this doesn't make a lot of sense to me -- this should just return the raw JSON array like any other request would return the raw JSON data. Is there a reason for this behaviour?