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
98 26 32 35

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 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 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.