Answers for "Pandas drop first and last row"

9

drop the last row of a dataframe

df.drop(df.tail(n).index,inplace=True) # drop last n rows
Posted by: Guest on June-23-2020
0

remove first row of dataframe

df = df.iloc[1: , :]
Posted by: Guest on September-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language