Python Keep Rows Together When Sorting Pigs