pandas concat generates nan values : <p>I am curious why a simple concatenation of two data frames in pandas:</p>

<pre><code>shape: (66441, 1)
dtypes: prediction    int64
dtype: object
isnull().sum(): prediction    0
dtype: int64

shape: (66441, 1)
CUSTOMER_ID    int64
dtype: object
isnull().sum() CUSTOMER_ID    0
dtype: int64
</code></pre>

<p>of the same shape and both without NaN values </p>

<pre><code>foo = pd.concat([initId, ypred], join='outer', axis=1)
print(foo.shape)
print(foo.isnull().sum())
</code></pre>

<p>can result in a lot of NaN values if joined.</p>

<pre><code>(83384, 2)
CUSTOMER_ID    16943
prediction     16943
</code></pre>

<h2>How can I fix this problem and prevent NaN values being introduced?</h2>

<p>Trying to reproduce it like </p>

<pre><code>aaa  = pd.DataFrame([0,1,0,1,0,0], columns=['prediction'])
print(aaa)
bbb  = pd.DataFrame([0,0,1,0,1,1], columns=['groundTruth'])
print(bbb)
pd.concat([aaa, bbb], axis=1)
</code></pre>

<p>failed e.g. worked just fine as no NaN values were introduced.</p>
