*URGENT* (due to sanction in Russia): Extracting of Prices from TRADRUBSOFRA

Hi Developers,

I am currently working using Anaconda and i have coded the following:

df, err = ek.get_data(['TRADRUBSOFRA'], ['ROW80_3', 'ROW80_4'])


InstrumentROW80_3ROW80_40TRADRUBSOFRAOUTRIGHT FX SWAP YIELD ...ON 82.300/82.400 -752/248 -33.0/11.27..


As you can see, the columns are all concatenated together. I require the column values to be separate, so that the values are displayed in tabular form, just like in the RIC: TRADRUBSOFRA.

Appreciate the urgent help!

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @jiacheng.oh

    I am assuming that you want to get a tabular format data like displays in Eikon/Workspace Quote app like this.

    91950-1.png

    The TRADRUBSOFRA is a PAGE RIC and field data should be in a tabular format. However, the Eikon Data API get_data function returns data as a Dataframe object, when you just display the df object "as is", the data is truncated to fit a column.

    But if you get each column data from a Dataframe, the result is in a tabular format string:

    df, err = ek.get_data(['TRADRUBSOFRA'], ['ROW80_3', 'ROW80_4'])
    print(df.iloc[0]['ROW80_3'])
    print(df.iloc[0]['ROW80_4'])

    Result:

    91950-5.png


    Hope this helps.

Answers

  • Hi @Benjamin Preisler ,

    Where comes from this output ?
    Is it the result of print(df) ?

    NB: to display full df, prefer print(df.to_string())