get last row pandas dataframe code example
Example 1: drop last row pandas
df.drop(df.tail(n).index,inplace=True) # drop last n rows
Example 2: print last n rows of dataframe
df1.tail(n)
df.drop(df.tail(n).index,inplace=True) # drop last n rows
df1.tail(n)