Fastest way to sort a large number of arrays in python

前端 未结 3 2038
难免孤独
难免孤独 2021-01-21 14:46

I am trying to sort a large number of arrays in python. I need to perform the sorting for over 11 million arrays at once.

Also, it would be nice if I could directly get

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 14:58

    Your input and output is a bit confusing. Please provide some sample data.

    But look into: http://pandas.pydata.org/pandas-docs/stable/api.html#reshaping-sorting-transposing Pandas sorting is as optimized as it gets. Focus on the series sort as each column of the DataFrame is more accurately represented as a series.

提交回复
热议问题