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
19 1 1 6

Error for TR.DivAdjustedGross.

Hello! I have trouble getting values for "TR.DivAdjustedGross":

I receive an error:

Error code -1 | Output parameter 'date' is unrecognized. This could possibly happen because of mismatch between top level function expression and its usage in output. Make sure that you used exactly 1:1 identical expressions. Requested universes: ['AAPL.O']. Requested fields: ['TR.DIVADJUSTEDGROSS']

Would appreciate any help.

Here is a code:

import refinitiv.data as rd

import pandas as pd


rd.open_session()

COMPANY = ["AAPL.O"]

START_DATE = "2022-11-30"

END_DATE = "2023-12-31"

FIELDS = [

"TR.DivAdjustedGross",

]

df = rd.get_history(universe=COMPANY, fields=FIELDS, interval="1M", start=START_DATE, end=END_DATE)


print(df)

company_df = pd.DataFrame({"Company": [COMPANY]})

rd.close_session()


pythoncodebookrefinitiv-dataplatform-libraries
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
5.8k 18 2 7

Hi @vitali ,


You are getting this error because rd.get_history doesn't support the provided field due to nature of the field. Consider using get_data as below:

COMPANY = ["AAPL.O"]

START_DATE = "2022-11-30"

END_DATE = "2023-12-31"

FIELDS = [

"TR.DivAdjustedGross", "TR.DivAdjustedGross.coraxdividenddate"

]

df = rd.get_data(universe=COMPANY, fields=FIELDS, parameters = {'Sdate':START_DATE, 'Edate':END_DATE})


screenshot-2024-01-31-at-172427.png


Hope this helps.


Best regards,

Haykaz


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
19 1 1 6

This helped indeed. Thank you a lot!

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.