I am stuck at getting the last, penultimate and antepenultimate values of a variable in python. I have two dataframes: