Closed ericpien closed 2 months ago
Update readme
Update readme
Done. Thanks for reviewing.
Set df indexes. And some might be better as simple dict.
Set df indexes. And some might be better as simple dict.
I converted data with just 2 columns to dicts and kept the others as DF with the indices set.
hey @ValueRaider not sure if you've been busy or just missed it so pinging again. thanks.
Looks good for SPY
. I'm just thinking about the exception experience.
I would rephrase this:
raise YFDataException("Failed to parse quote type. No Fund data found.") to raise YFDataException("No Fund data found.")
Then with:
except IndexError:
raise YFDataException("Failed to parse fund json data.")
don't discard the original exception. See how base.py
handles exceptions.
Thanks for reviewing @ValueRaider. I interpreted the part about "don't discard the original exception" as meaning to log the base exception so implemented as such.
Changes:
FundsData
.ticker.funds_data
when appropriate. When the ticker symbol is not that of a fund's, the code will throw an error when a parameter offunds_data
is called. i.e.yf.Ticker('AAPL').funds_data.description
test_ticker.py
for the funds datatest_ticker.py
asYFChartError
was removed from code in https://github.com/ranaroussi/yfinance/pull/2000Resolves:
Sample Code:
Credits to https://github.com/ranaroussi/yfinance/pull/1784 for the idea