Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
4 2 3 6

Why do I get less data when I download data from Python API?

Hi,

I'm trying to get ESG indicator data for S&P 500 for 2019. I have tried to get the data from Python. It gives me around 350 values and the rest, 155, are missing values. When I download the same data from Screener app I get much more data, almost 505 observations are covered. I was wondering what could be the reason and whether I can get help to solve this problem.


I used the following code to obtain the data for 2019 in Python:


First I obtain the list of S&P 500 firms at the beginning of 2019:

sp2019, err = ek.get_data('0#.SPX(20190101)', 'TR.IndexConstituentRIC',)


Then I get the PermID for these firms:

sp2019.columns = ['inst','ric']

ric19= ek.get_symbology(sp2019.inst.tolist())


Then I construct a list including the PermIDs for these firms:

list19= list(ric19.OAPermID)


And using this list I obtain ESG indicator data for 2019 (I download all the 186 indicators and ESG category scores, here I pasted the first few indicators to be brief):

data2019, err=ek.get_data(list19,['TR.CommonName','TR.RIC','TR.GICSIndustry',

'TR.TRESGScore(Period=FY2019,Frq=FY).date',

'TR.AnalyticEqualShareholderRightsScore(Period=FY2019,Frq=FY)',

'TR.AgrochemicalProductsScore(Period=FY2019,Frq=FY)',

'TR.AnalyticAntiTakeoverDevicesScore(Period=FY2019,Frq=FY)',

'TR.AnalyticAuditCommIndScore(Period=FY2019,Frq=FY)',

'TR.AnalyticAuditCommMgtIndScore(Period=FY2019,Frq=FY)',

'TR.AnalyticBoardAffiliationsScore(Period=FY2019,Frq=FY)',

'TR.AnalyticBoardAttendanceScore(Period=FY2019,Frq=FY)']


Thank you in advance for the help.


Mahdieh

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you for your participation in the forum.
Is the reply below satisfactory in resolving your query?
If yes please click the 'Accept' text next to the reply.
This will guide all community members who have a similar question.
Otherwise please post again offering further insight into your question.
Thanks,
AHS


Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
18.2k 21 13 21

Hi @mahdiehvg

Following your code, the result on data2019 does container only 369 non-null rows.


I selected one of the RIC(null value) and tried to retrieve the data on a different period.

And it seems that the data does not available in 2019 period but available in 2017/2018 period.


So if you would like to clarify the data availability,

For an authoritative answer to any content questions, the best resource is the Refinitiv Content Helpdesk.
The Refinitiv Content Helpdesk can be reached using Contact Us capability in your Eikon application.
Or by calling the Helpdesk number in your country.
Or at https://my.refinitiv.com/



ahs1.png (26.5 KiB)
ahs2.png (47.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.