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 1

Exclude records with specific field values

I am trying to use codebook to extract certain data as per the code found below

from the data extracted I would like to exclude records with values other than USD in the CF_CURR field

Any idea how I can do that?

df, err = ek.get_data(

instruments = ['0#EGEUROSAZ='],

fields = ['CF_CURR']

)

display(df)

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apiapicodebook
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
Upvote
Accepted
18.2k 21 13 21

Hi @youssef.mourad

You can read some articles online about how to select dataframe row with column value condition.

Here is example, https://www.geeksforgeeks.org/selecting-rows-in-pandas-dataframe-based-on-conditions/


Here is the sample code for your question:


ahs.jpg (49.4 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.

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.