Python - how to reduce a list and keep values?
<p>I have a list looking like that: </p>

<pre><code>[[12, 0.029], [12, 0.039], [12, 0.012], ...some hundreds more... [13, 0.04], [13, 0.01], ...]
</code></pre>

<p>The first values range from 3 to 15, with an overall count of about 3000 values</p>

<p>For boxplotting I would need a solution where a boxplot is created for each first value with all second values. Like: </p>

<pre><code>data_to_plot = [ all second values of list with value 12], [all second values of list with value 13],... 
</code></pre>

<p>Looking like: </p>

<pre><code>data_to_plot = [0.029, 0.039], [0.04, 0.01],...
</code></pre>

<p>Thanks! </p>