Answers for "getting last n rows of column"

0

getting last n rows of column

# 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)
Posted by: Guest on March-13-2022

Code answers related to "getting last n rows of column"

Python Answers by Framework

Browse Popular Code Answers by Language