hide last line df [1 rows x 2 columns]] code example Example: drop last row pandas df.drop(df.tail(n).index,inplace=True) # drop last n rows