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.

Hello @youssef.mourad,

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 appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

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
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.