When using Workspace Python API under Windows 10, some simple queries take a long time to complete.
For example, the Python commands:
import refinitiv.data as rd
rd.open_session()
df=rd.get_data('4296477482', ['TR.OrganizationID','AVAIL(TR.CompanyName,TR.CommonName)','(TR.InvestorSharesHeld/1000000-TR.InvtrPrevSharesHeld)/TR.InvtrPrevSharesHeld', \
'TR.SecurityOwnedName','TR.SecurityOwnedRIC','TR.InvestorValueHeld','TR.InvestorValueHeld.currency','TR.InvestorSharesHeld/1000000','TR.InvtrPrevSharesHeld'], \
parameters={'Scale':6,'NULL':'Blank','Curn':'NATIVE'})
df=df.sort_values(by=['Investor Based Value Held'],ascending=False,na_position='last').head(25)
df.to_excel('PythonOutput.xlsx', sheet_name='PythonData', index=False)
rd.close_session()
, take about half a minute to complete.
As this needs to be scaled to running this script around 10 times (I prefer to do so instead of a bulk download for all 10 at once), is there any way to make the code run faster?