Hello,

I am cleaning some data for a subsequent merge. The data has different index types(Timestamp and datetime.date) with dates that match. Here is a picture with a description of each type:

IM5Ee.png

And how they are taken and transformed into a dictionary to rename the index of the DataFrame.

######### Initialize: This is the data that I am using

self.spy = self.AddEquity("SPY") 
self.wti = self.AddEquity('WTI')
self.tb_rates = self.AddData(USTreasuryYieldCurveRate, "USTYCR") # Treasury bills rate

# qb.Download('https://fred.stlouisfed.org/graph/fredgraph.csv?id=PSAVERT') # Same data as txt
self.ps = self.AddData(Quandl,"FRED/PSAVE") # Personal savings, given monthly by the FRED

######### This is called from the OnData Method
history = self.History([self.spy.Symbol, self.wti.Symbol, self.tb_rates.Symbol], self.data_acum*2, Resolution.Daily)

history = history.append(self.History(self.tb_rates.Symbol, timedelta(740), Resolution.Daily),sort=False)

nw_ind = np.array(pd.to_datetime(pd.Series(history.index.get_level_values(1)),utc=True).dt.date)
old_ind = np.array(history.index.get_level_values(1))
history.rename(index = dict(zip(old_ind,nw_ind)), inplace=True)

I get the following error at the last line: TypeError: zip argument #1 must support iteration

How can I solve this problem? Thanks in advance.