Not only can you move rows down, you can also move rows up. So instead of deleting a certain number of rows, you can use move_range
with translate=True
to move everything coming after the to be deleted rows up by the same amount and have the the relative references in formulae adapted.