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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 1 4

Na in params dict

Which parameter do I have to pass to get_data to replace NA / NULL with a given value? Example:

tmp=eik.get_data(tTickers, ['TR.AdjmtFactorAdjustmentDate', 'TR.AdjmtFactorAdjustmentType', 'TR.AdjmtFactorAdjustmentFactor'], {'SDate':ds, 'EDate':de, 'Curn':'USD', 'FRQ': 'D'})[0]

I would like to add to the dict a key,value pair such as: 'NAValues' : 0

Right now the function returns a NULL value that is taken by python as nan, however it is not np.nan or np.NAN.

Thanks,

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonparams
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
4.6k 26 7 22

There are three values that the 'NULL' parameter can take: ZERO, NA and BLANK, but nothing that you can customise, I am afraid.

my pandas seems to think that this is a np.nan, so this call worked successfully:

df.replace(np.nan, "your_value", inplace=True)

and np.isnan() is True for the specific cell.

Let me know if this works

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