question

Upvotes
Accepted
1 0 0 1

Industry Median fields not working

Fields related to the median industry (found in Codecreator) are giving me error 414. Is it something related to these fields or what is the reason? Any alternative would be appreciated.

from refinitiv.data.content import fundamental_and_reference

fields = [

'TR.MedianIncAvailToComExclExordItemsMargPct',

'TR.MedianNetMargPct',

'TR.MedianGrossProfMarg',

'TR.MedianEBITDAMargPct',

'TR.MedianNetIntrMargTotPct',

'TR.MedianPretaxROEPct',

'TR.MedianIncTaxRatePct',

'TR.MedianEarnRetentionRate'

]

response = fundamental_and_reference.Definition(

universe = ['NVDA.O'],

fields = fields

).get_data()

data = response.data.df

eikon-data-apipythonworkspace-data-api#contentequitiesfundamental-data
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
84.6k 287 53 77

@alejandro.gonzalez

Thank you for reaching out to us.

It looks like to be a content question. The code works fine with other fields.

fields = [
   'TR.CommonName',
   'TR.PriceClose',
   'TR.MedianIncAvailToComExclExordItemsMargPct',
   'TR.MedianNetMargPct',
   'TR.MedianGrossProfMarg',
   'TR.MedianEBITDAMargPct',
   'TR.MedianNetIntrMargTotPct',
   'TR.MedianPretaxROEPct',
   'TR.MedianIncTaxRatePct',
   'TR.MedianEarnRetentionRate'
]
response = fundamental_and_reference.Definition(
   universe = ['NVDA.O'],
   fields = fields).get_data()

data = response.data.df
data

1719977791405.png

Please contact the helpdesk team directly via MyAccount to verify the data of those fields.


1719977791405.png (12.7 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 0

I am getting below error when using the above code.

--------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
/tmp/ipykernel_209/3472950077.py in <module>
     19 ]
     20 
---> 21 response = fundamental_and_reference.Definition(
     22 
     23 universe = ['NVDA.O'],

NameError: name 'fundamental_and_reference' is not defined




[ ]:





 
              
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 0

Can you comment why using PFE we are getting the error

? @Jirapongse

NameError: name 'fundamental_and_reference' is not defined
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.

Grace, that name error is because you did not import the library
from refinitiv.data.content import fundamental_and_reference

So, the issue comes to the Content Team as @Jirapongse said. Something with those fields is not working as expected. I already contacted the help desk and would expect to receive a response in the next hours or so.

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.