how to take last row and first column in pandas code example Example 1: get last column pandas df.iloc[:,-1:] Example 2: location of last row dataframe rows = df.iloc[-2:]