addisonlynch / iexfinance

Python SDK for IEX Cloud
https://addisonlynch.github.io/iexfinance
Apache License 2.0
648 stars 136 forks source link

stock.get_financials() output is not dataframe #270

Open jpcam opened 2 years ago

jpcam commented 2 years ago

Summary (include Python version)

The output is some kind of nested dictionary which is difficult to parse. from iexfinance.stocks import Stock stocks=Stock(['NEM','FCX'],token='my_live_token',output_format='pandas') fins_data=stocks.get_financials(period='annual') print(fins_data)

returns a dictionary (2x1x70)

Date/time of issue

Dec 1 2021

Expected behavior

iexfinance documentation suggests it will output a pandas dataframe. It should be similar to the output from the following: from iexfinance.stocks import Stock stocks=Stock(['NEM','FCX'],token='my_live_token') co_info=stocks.get_company() print(co_info)

Actual behavior

returns a dictionary (2x1x70)