I was playing with the code for csv_editor, and noted when I tried to remove a row when I had multiple items selected in that row, it removed the same number of rows as selected items. This is because it uses len(selected) to pick how many rows to remove (instead of number of rows). I changed it to instead find out how many rows are selected (in MainWindow):
num_rows = len(set(index.row() for index in selected))
if selected:
self.model.removeRows(selected[0].row(), num_rows, None)
And now remove_rows works as desired.