I want to remove m the number of rows from the bottom of the data frame. It is indexed by an integer (with holes). How can this be done?
pandas == 0.10.1 python == 2.7.3
Use the slice to select the part you need:
df[:-m]
If you want to remove some middle lines, you can use drop :
drop
df.drop(df.index[3:5])
This should work
df.head(len(df) - m)