Cpp Array Sort Python Dataframe Add Index