Javascript Copy And Sort Array Python Numpy And Pandas