Organisation PermID for each RIC

Hi community, I am trying to download data and organization PermID for each instrument. However it is only retrieving the Organization PermID once as shown in picture below.

Please see attached the code as well. I would like for organization permid to be repeated for each row (similar to RIC).

1689931619266.png

 df,err = ek.get_data("List('io-july2020')",[
'TR.OrganizationID',
'TR.SharesHeld.calcdate',
'TR.InvestorFullName',
'TR.SharesHeld',
'TR.PctOfSharesOutHeld',
'TR.InvestorType',
'TR.InvestorTypeId',
'TR.InvParentType',
'TR.InvInvestmentStyleCode',
'TR.OwnTrnverRating',
'TR.OwnTurnover',
'TR.InvAddrCountry',
'TR.InvestorAddrCity'],parameters={'SDate':'2020-06-30',"TheInvestorType":"101:102:103:104:106:107:108:110:112:113:114:116:117:302:304:401:402:403:404:405:406:407:408:409:410:411:412"})
df

Any help would be appreciated.

@Jirapongse

Tagged:

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @faiza.zafar

    Thank you for reaching out to us.

    You can use the fillna method to fill NA/NaN values using the previous value.

    df["Organization PermID"] = df["Organization PermID"].fillna(method='ffill')

    The output is:

    1689936561938.png


Answers