Mass Spectrometry, Tutorial, Python, Data Analysis, Research.
sort=True) best_matches = [x for x in sorted_matches if x[1]["ModifiedCosine_matches"] >= min_match][:10] [x[1] for x in best_matches] Which gives Out[]: [(1., 151), (0.95295779, 15), (0.94542762, 13), (0.89735889, 17), (0.7886489, 12), (0.77433041, 9), (0.74935776, 8), (0.72854032, 8),