Put ignore_index=true after sorting
self.data.sort_values(by=[column], inplace=True, ignore_index=True) If not it resets to default index