Efficient chain merge in pandas
<p>I found that straightforward chain merging with pandas library is quite inefficient when you merge a lot of datasets with a big number of columns by the same column.</p>
<p>The root of the problem is the same as when we join a lot of str's dumb way:</p>
<pre><code>joined = reduce(lambda a + b, str_list)
</code></pre>
<p>Instead of:</p>
<pre><code>joined = ''.join(str_list)
</code></pre>
<p>Doing chain merge we're copying the dataset many times (in my case almost 100 times) instead of just filling columns from several datasets at once or in order.</p>
<p>Is there is some efficient way (= with linear complexity by the number of sets) to chain merge by the same column a lot of datasets?</p>