Pandas adding Time column to Date index
问题 I have a dataframe, Date index type is Timestamp , Time column is datetime.Time : Time Value Date 2004-05-01 0:15 3.58507 2004-05-02 0:30 3.84625 ... How do I convert it to: Value Date 2004-05-01 0:15 3.74618 2004-05-01 0:30 3.58507 2004-05-01 0:45 3.30998 I wrote a code which does work, but it's not very pythonic: ind = frame.index.get_level_values(0).tolist() tms = frame['Time'] new_ind = [] for i in range(0, len(ind)): tm = tms[i] val = ind[i] + timedelta(hours=tm.hour, minutes=tm.minute,