how to select last 20 rows of the dataframe pyhton code example Example: print last n rows of dataframe df1.tail(n)