I declared a multidimensional array that can accept different data types using numpy
count_array = numpy.empty((len(list), 2), dtype = numpy.object)
The first array has got strings and the second has got numbers. I want to sort both the columns on the basis of the numbers …
Is there any easier way like sort() method to do this ?
You could argsort the second column, then use so-called “fancy-indexing” on the rows: