merge arrays in python based on a similar value
<p>I want to merge two arrays in python based on the first element in each column of each array.</p>

<p>For example,</p>

<pre><code>A = ([[1, 2, 3],
[4, 5, 6],
[4, 6, 7],
[5, 7, 8], 
[5, 9, 1]])

B = ([[1, .002],
[4, .005],
[5, .006]])
</code></pre>

<p>So that I get an array</p>

<pre><code>C = ([[1, 2, 3, .002],
[4, 5, 6, .005],
[4, 6, 7, .005],
[5, 7, 8, .006],
[5, 9, 1, .006]])
</code></pre>

<p>For more clarity:</p>

<p>First column in A is 1, 4, 4, 5, 5 and
First column of B is 1, 4, 5</p>

<p>So that 1 in A matches up with 1 in B and gets .002</p>

<p>How would I do this in python? Any suggestions would be great.</p>
