yahooquery icon indicating copy to clipboard operation
yahooquery copied to clipboard

Company Officer for Multiple Tickers

Open LS1706 opened this issue 5 years ago • 4 comments
trafficstars

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:

image

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

image

Describe the solution you'd like

Would it be possible to return a dataframe for multiple tickers as well?

LS1706 avatar Jun 12 '20 22:06 LS1706

Hey there! Could you share your code? I'm failing to reproduce your issue.

image

rodrigobercini avatar Jun 13 '20 15:06 rodrigobercini

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.

LS1706 avatar Jun 13 '20 16:06 LS1706

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.

dpguthrie avatar Jun 14 '20 21:06 dpguthrie

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.

LS1706 avatar Jun 14 '20 21:06 LS1706