Pands program to show last 10 rows in excel code example Example: how to remove last 2 rows in a dataframe df1 = df.iloc[:3]