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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 3

How Do i only get the monthly quotes (excl Q & Cal)

HI

How do I get only the monthly quotes in the query? It currently pulls the Q and Cal quotes.

Reuters_Ticker = '0#DUBSGEFS:

dfDubaiEFS, err = ek.get_data(Reuters_Ticker,'Euro_Close')

Thanks


Joe


eikoneikon-data-apipython
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
1.7k 2 4 7

Hi @joe.wright ,

I'm not sure if we can filter that in the get_data call. However, you may use the code below to filter only monthly data from the output dataframe

import numpy as np
dfDubaiEFS, err = ek.get_data('0#DUBSGEFS:',['DSPLY_NAME','EURO_CLOSE'])

# get only monthly data
months = ['JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC']
dfDubaiEFS['Monthly'] = np.where(dfDubaiEFS['DSPLY_NAME'].str[10:13].isin(months), True, False)

dfDubaiEFS_monthly = dfDubaiEFS[dfDubaiEFS['Monthly']==True]
display(dfDubaiEFS_monthly)

1635489764452.png

Note: the monthly data was filtered using DSPLY_NAME column, to get only name that contain months, so the quarterly (e.g. Dubai EFS 3Q25) and annually (e.g. Dubai EFS 2025) are filtered out

1635489789739.png



1635489764452.png (39.0 KiB)
1635489789739.png (6.2 KiB)
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