yahooquery
yahooquery copied to clipboard
Company Officer for Multiple Tickers
Is your feature request related to a problem? Please describe.
I am trying to get executive officers salary and title. When I run .company_officers with only one ticker the data is a well-presented data frame. Like in the picture below:

However, when I run multiple tickers with .company_officers I get a series of dictionaries stack on top of another one, which is annoying.

Describe the solution you'd like
Would it be possible to return a dataframe for multiple tickers as well?
Hey there! Could you share your code? I'm failing to reproduce your issue.

Hi @rodrigobercini, below is the code. Please let me know if I am missing something.
from yahooquery import Ticker
tickers = Ticker("WHR.L BBOX.L SGRO.L LMP.L STP.L SHED.L CREI.L PCA.L RGL.L CRC.L "
"SREI.L PCTN.L SLI.L BREI.L BCPT.L RDI.L CLI.L MCKS.L RLE.L SMP.L "
"EPIC.L TOWN.L AEWU.L HWG.L UKCM.L PNS.L ALP.JO IHR.L LXI.L "
"PRSR.L SUPR.L SOHO.L SIR.L CSH.L DIGS.L ESP.L THRL.L PHP.L AGR.L CAL.L "
"INTU.L HMSO.L NRR.L LAS.L DLN.L SHB.L WKP.L GPOR.L BLND.L LAND.L "
"CAPC.L HLCL.L BYG.L SAFE.L UTG.L HCFT.L")
tickers.company_officers
I think is due to the fact that for some of the companies there is no data available for company officers and affects the structure. But I do need those company in the ticker for other variables.
What would the desired behaviour be? Would you rather the symbols without data just be dropped from the result entirely?
The idea behind returning the dictionary was so the user had an idea of what symbols have/don't have data. Otherwise, they just wouldn't appear at all.
hi @dpguthrie, thanks for the reply. It would be great if either the symbol with no data is dropped or return a "no result" string in the row, but keeping the dataframe format as It is more user-friendly.