df get last row of column code example Example 1: get last column pandas df.iloc[:,-1:] Example 2: location of last row dataframe rows = df.iloc[-2:]