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
1 1 1 5

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

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,
AHS

@ET2

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an 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 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.