get last 4 positions of a dataframe python code example Example: print last n rows of dataframe df1.tail(n)