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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
98 10 21 27

Python: setting parameters to 'None' produces errors.

Hello,

I would like to know how to set some parameters to "None" without it producing errors in the data request.

e.g.

df = ek.get_data(identifiers, ['TR.CapitalExpenditures','TR.CashFromOperatingAct'], {'SDate':'0CY','Period':'FY0','Scale':6, 'Curn':'USD'})[0]

If I wanted to do 'Curn': None, I get errors. Is there a way to omit certain parameters like this?

Thanks in advance!

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
39.2k 75 11 27

Just omit the parameter from the request. In your example use

ek.get_data(identifiers, ['TR.CapitalExpenditures','TR.CashFromOperatingAct'], {'SDate':'0CY','Period':'FY0','Scale':6})
'Curn' parameter is useful when you want to convert income statement or balance sheet items to the currency other than the currency of the company report. E.g. when you look at companies from different countries you may want to view their fundamentals in the same currency for easy comparison. If you'd like to retrieve company fundamentals in the currency in which the company reported them, just don't put the 'Curn' parameter in the request.
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.

Click below to post an Idea Post Idea