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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
capture.png (60.5 KiB)
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
18k 21 12 20

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 5.0 MiB each and 10.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.

Click below to post an Idea Post Idea