How to retrieve the names and tickers from a List (DSWS)

Using Codebook, How do we map the names/tickers in the result below? It only shows Instrument number:


# get constituent list

df1 = ds.get_data(tickers='LS&PCOMP|L', fields=['P'], kind=0)

# get a subset of first 50 instruments

#slist = ','.join(df1['Instrument'].tolist()[0:50])

# get timeseries data for it

df2 = ds.get_data(tickers=slist, fields=['P','WC01001'], start='2022-02-01', end='2022-02-01', kind=1)

display(df2)

Best Answer

  • Hi @dan.gabriel@lseg.com,


    May I suggest that you look for the field you are after in the Datastream Portal? Specifically in the Datatype Search:

    1679916989297.png


    1679917010576.png


    # get timeseries data for it
    df2 = ds.get_data(
    tickers=slist,
    # fields=['P', 'WC01001', 'RIC'],
    fields=['RIC'],
    start='2022-02-01', end='2022-02-01',
    kind=0)
    display(df2)




Answers