I am trying to run the bellow code:
cpi = ek.get_timeseries(['USCPI=ECI'],start_date='2005-01-01', end_date = "2020-09-24", interval='monthly')
cycle, trend=sm.tsa.filters.hpfilter(cpi, 6.25 (1600/4**4))
When I read the ric and call the columns names it appears just [Value] and not the date column?
How can I work date like a normal column?
The TypeError is due to the expression you pass to the lamb argument of hpfilter method. The value of this argument must be a float. You pass the expression "6.25 (1600/4**4)", which does not evaluate to a float. I suppose you must have copied and pasted it from the statsmodels documentation that suggests using the value of 6.25 for annual data, and provides that the value of 6.25 is arrived at by taking 1600 and dividing it by 4 to the power of 4 (1600/4**). In any case the error has nothing to do with Eikon Data APIs. It is returned by the line of code that doesn't utilize any Refinitiv software. This forum is dedicated to Eikon Data APIs. For questions about using statsmodels library you'd be better off using forums dedicated to that topic.
To answer your second question, get_timeseries method returns pandas dataframe indexed on the timestamp. To get the dates for the timeseries in your dataframe use cpi.index.