I have the following data frame:
ABC Index 2001-06-30 100 2001-08-31 (=value of A at date B) 2001-07-31 200 2001-09-30 ... 2001-08-31 300 2001-10-31 ... 2001-09-30 400 2001-11-30 ...
Column B consists of dates from column A , pushed forward by some. I would like to create a column C that consists of the values ββfrom column A to date B (It is desirable in logic that this makes the excel VLOOKUP formula. I am not looking here just for a shift (-2), because in reality the shift between B and Index not always equal).
I tried df.loc['B', 'A'] , but this most likely simplified and produced an error.
source share