to get an observation from pandas dataframe code example Example: pandas get data from upper row df.shift(1)