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

How to get a custom field with matched dates

Hello,

I'm trying to reproduce the following Excel call in python:

=TR(RIC_Vec,"TR.NetIncomeCFStmt()/TR.CompanyMarketCap()","SDate=#1 EDate=#2 Frq=#3 CH=IN RH=calcdate NULL=#4 Period=LTM",,Start_Date,End_Date,"M",NullH)

I get a neat wide output:


I'm wondering how the get_data command would be and if it's even possible to get (even in long format) an output in a way that all dates (in this case months) are filled and that outright calculates the ratio I'm providing.


Thank you.


EDIT: I'm fine with it retrieving NaN/NULL/NA if there's no available prior value. If there is I'd like it to present the previous available.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
capture.png (60.5 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.

@gonzalofernandezs

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text beneath the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks, AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
18.2k 21 13 21

Hi @gonzalofernandezs

You can do custom operations in Python on the dataframe.

Here is an example:


ahs.png (75.8 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.

Alright, so as long as I choose the highest frequency field as the date one all rows will be filled? How is this setting that if there's a value missing grab the previous available? Or is that the default?

Thank you.

I believe that you will get NaN in the dataframe.

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.