Screening using name contains

exp =  "SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeCountryCode,CA), CURN=CAD)"


exp = "SCREEN(U(IN(Equity(active,public,private,primary))), Contains(TR.CommonName,%s), CURN=CAD)" %name


fields = ["TR.CompanyName"]


df,e = ek.get_data(exp, fields)

The first exp works, but the second one does not. How is the "Contains" argument supposed to be used?

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @dshi

    The name should in double quotes. I have tried this one and it works.

    name = '"Business"'
    exp = 'SCREEN(U(IN(Equity(active,public,private,primary))), Contains(TR.CommonName,%s), CURN=CAD)' %name
    fields = ["TR.CompanyName"]
    df,e = ek.get_data(exp, fields)
    print (df)

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.