# Getting last 2 rows of columns # Age and Marks from df df_last_2 = df[['Age', 'Marks']].tail(2) # Printing df_last_2 print(df_last_2)