Import classification / taxonomy from CSV

Is there a way to import classification / taxonomy data from a CSV file? Say I have an ETF or Fund whose data isn’t available on ETF-Data and so won’t automatically update its sectors and regions. I’d like to have a CSV that has these details and import them… or copy-paste them somewhere even.

2 Likes

It would be handy to have Global Industry Classification Standard codes available. This code demonstrates it’s not neccessarily standard:

>>> import yfinance as yf
>>> symbol = "BHP"
>>> exchange = "ASX"
>>> exchange_code = ".AX"
>>> stock = yf.Ticker(symbol + exchange_code)
>>> stock.info['symbol']
'BHP.AX'
>>>
>>>
>>> stock.info['quoteType']
'EQUITY'
>>> stock.info['sector']
'Basic Materials'
>>> stock.info['industry']
'Other Industrial Metals & Mining'
>>> stock.info['market']
'au_market'