Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Hide the \ mark of the display result

Hi,

Use python

I want to acquire a row in a row like an excel sheet,

but when I look at the acquisition result,

it is displayed as "¥" and it is displayed in the lower row.

Please help Is there a solution?

Here is the code and the output result.

    instruments=[
                '1801.T',
            ],
    fields = [
        'TR.Cash',
        'TR.CashAndEquivalents',
        'TR.ShortTermInvestments',
        'TR.CashAndSTInvestments',
        'TR.AcctsReceivTradeGross',
        'TR.ProvsnForDoubtfulAccts',
        'TR.AcctsReceivTradeNet',
        'TR.STNotesReceivable'
    ],
    parameters = {
        'CH' : 'In',
        'SDate'  :   '1997-01-01',
        'EDate' : '2018-12-31',
        'DivPayType' :' SDI:SCA:CSA'
    }
    )
eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
段落.png (24.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
80.1k 257 52 75

I think that is how the dataframe is printed to the console. However, if you use pandas.DataFrame.to_string() function to convert the data to string, it will print the data without '\'.

df, err = ek.get_data(  instruments=[
                '1801.T',
            ],
    fields = [
        'TR.Cash',
        'TR.CashAndEquivalents',
        'TR.ShortTermInvestments',
        'TR.CashAndSTInvestments',
        'TR.AcctsReceivTradeGross',
        'TR.ProvsnForDoubtfulAccts',
        'TR.AcctsReceivTradeNet',
        'TR.STNotesReceivable'
    ],
    parameters = {
        'CH' : 'In',
        'SDate'  :   '1997-01-01',
        'EDate' : '2018-12-31',
        'DivPayType' :' SDI:SCA:CSA'
    })

print(df.to_string())

Otherwise, you can also iterate the returned dataframe to get the data.


df.png (109.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 1

Hi @jirapongse.phuriphanvichai

I was able to do it well. I appreciate it very much. Thank you

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.