Question : getting last n rows of column
Answered by : harish-vasanth
# 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)
Source : https://www.geeksforgeeks.org/get-last-n-records-of-a-pandas-dataframe/ | Last Update : Sun, 20 Mar 22