I have a list (length 300) of lists (each length 1000). I want to sort the list of 300 by the median of each list of 1000, and then plot a seaborn boxplot of the top 10 (i.e. the 10 lists with the greatest median).
I am able to plot the entire list of 300 but don't know where to go from there.
I can plot a range of the points but how to I plot, for example: data[3],data[45], data[129] all in the same plot?
ax = sns.boxplot(data = data[0:50])
I can also work out which items in the list are in the top 10 by doing this (but I realise this is not the most elegant way!)
array_median = np.median(data, axis=1)
np_sortedarray = np.sort(np.array(array_median))
sort_panda = pd.DataFrame(array_median)
TwoL = sort_panda.reset_index()
TwoL.sort_values(0)
Ultimately I want a boxplot with 10 boxes, showing the list items that have the greatest median values.
Example of data: list of 300 x 1000 [[1.236762285232544, 1.2303414344787598, 1.196462631225586, ...1.1787045001983643, 1.1760116815567017, 1.1614983081817627, 1.1546586751937866], [1.1349891424179077, 1.1338907480239868, 1.1239897012710571, 1.1173863410949707, ...1.1015456914901733, 1.1005324125289917, 1.1005228757858276], [1.0945734977722168, ...1.091795563697815]]