I am trying to retrieve mid price for the following ticker using the below
df = ek.get_data('EURCBS3M=ICAP', ['TR.ASKPRICE.Date', 'TR.ASKPRICE','TR.BIDPRICE'], parameters={'SDate':'2017-08-01', 'EDate':'2020-09-14'})
I do not believe Mid is available so i retreive Bid and Ask
So i am first ading new column for Mid
df['Mid'] = df['TR.ASKPRICE'] + df['TR.BIDPRICE']
but coming back with error :
df['Mid'] = df['TR.ASKPRICE'] + df['TR.BIDPRICE']
TypeError: tuple indices must be integers or slices, not str
Can someone explain what is going wrong here - whey it does not recognise above as dataframe?
Also by retrieving in this manner is the Date column recognised as an actual date?