print last n rows of dataframe

df1.tail(n)

Here is what the above code is Doing:
1. We’re using the .head() method to select the first 5 rows of the df1 DataFrame.
2. We’re using the .tail() method to select the last 5 rows of the df1 DataFrame.
3. We’re using the .head(n) method to select the first n rows of the df1 DataFrame.
4. We’re using the .tail(n) method to select the last n rows of the df1 DataFrame.