For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Thanks. Jirapongse.
I tried your way and find it works. But what if I need to apply multiple criteria to narrow down searching results? I tried to right the function this way:
df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,private))),(Contains(TR.CommonName,"machinary") AND Contains(TR.CommonName,"China"))'], ['TR.CommonName','OAPermID'])
but there is no result as it is in Eikon Excel. Can you check where is the error?
You missed the closing parenthesis for the SCREEN.
df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,private))),(Contains(TR.CommonName,"machinary") AND Contains(TR.CommonName,"China")))'], ['TR.CommonName','OAPermID'])
Thanks for reminding me my mistake.
I tested your code with coming result that only companies with key word "machinary" but no "China" in name are found. Later on, I found that there are no company meets the criteria of containing both key words "machinary" and "China" in name.
So, I'm wondering what is the logical of “condition A and condition B” . In general, any condition=false will result in logical false, so that the screening result shall be none. Am I right?
Is this a possible bug?
You can use a screener to find RICs with the company name.
df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"Machine"))'], ['TR.CommonName']) df
The above code returns RICs that the common name contains "Machine".
You can use the Eikon Excel to create the screener formula and then use it with the get_data method.