On Excel I use DSGRID("S&PCOMP";"afcmn2019;afcmn2020;afcmn2021;afcmn2022") and
DSGRID("msbrazl";"afcmn2019;afcmn2020;afcmn2021;afcmn2022"). How to query on python using ek.get_data?
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
On Excel I use DSGRID("S&PCOMP";"afcmn2019;afcmn2020;afcmn2021;afcmn2022") and
DSGRID("msbrazl";"afcmn2019;afcmn2020;afcmn2021;afcmn2022"). How to query on python using ek.get_data?
Hi,
Thank you for your participation in the forum.
Is the reply below satisfactory in answering your question?
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
This data comes from Datastream Web Service. To retrieve it you need to use DatastreamDSWS library. For documentation see Getting Started Guide. You may also want to check out the video titled Build Financial Models in Python using Datastream Web Service.
Here's the code snippet that retrieves the data you're interested in
import DatastreamDSWS as dsws ds = dsws.Datastream(username='my_username', password='my_password') ds.get_data (tickers='S&PCOMP, MSBRAZL', fields=['AFCMN2019','AFCMN2020','AFCMN2021','AFCMN2022'])