I use the following code to drop some rows based on their position in df:
for i in irange:
df.drop(df.iloc[i].name, inplace=True)
However, it seems I can't do it in a loop and I get:
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
This other question is about columns, while mine is about rows:
irange?