<p dir="auto">Kind of an edge case I would say, but still it would be nice to get an error or have an automatic renaming of the columns. If a simple error is acceptable as a first step I could definitely put together a PR.</p>
<p dir="auto">The following snippet shows that when you concatenate a column of zeros and a column of ones the resulting dataframe has two columns of ones:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
import numpy as np
ts0 = pd.Series(np.zeros(5))
ts1 = pd.Series(np.ones(5))
ts0.name = ts1.name = 'same name'
df = pd.concat([ts0, ts1], axis=1)
print df"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">ts0</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">np</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">5</span>))
<span class="pl-s1">ts1</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-c1">5</span>))
<span class="pl-s1">ts0</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">ts1</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s">'same name'</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">ts0</span>, <span class="pl-s1">ts1</span>], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)
<span class="pl-k">print</span> <span class="pl-s1">df</span></pre></div>
<p dir="auto">and the output (pandas 0.10.1):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   same name  same name
0          1          1
1          1          1
2          1          1
3          1          1
4          1          1"><pre class="notranslate"><code class="notranslate">   same name  same name
0          1          1
1          1          1
2          1          1
3          1          1
4          1          1
</code></pre></div>
<p dir="auto">whereas I would expect:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   same name  same name
0          0          1
1          0          1
2          0          1
3          0          1
4          0          1"><pre class="notranslate"><code class="notranslate">   same name  same name
0          0          1
1          0          1
2          0          1
3          0          1
4          0          1
</code></pre></div>
<p dir="auto">Looks like this is due to <code class="notranslate">pandas.tools.merge._Concatenator._get_concat_axis</code> which doesn't check for name uniqueness, here is the relevant snippet:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="names = []
for x in self.objs:
    if x.name is not None:
        names.append(x.name)
    else:
        return Index(np.arange(len(self.objs))
return Index(names)"><pre class="notranslate"><span class="pl-s1">names</span> <span class="pl-c1">=</span> []
<span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">objs</span>:
    <span class="pl-k">if</span> <span class="pl-s1">x</span>.<span class="pl-s1">name</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>:
        <span class="pl-s1">names</span>.<span class="pl-en">append</span>(<span class="pl-s1">x</span>.<span class="pl-s1">name</span>)
    <span class="pl-k">else</span>:
        <span class="pl-k">return</span> <span class="pl-v">Index</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-en">len</span>(<span class="pl-s1">self</span>.<span class="pl-s1">objs</span>))
<span class="pl-s1">return</span> <span class="pl-v">Index</span>(<span class="pl-s1">names</span>)</pre></div>
<h3 dir="auto">Code Sample, a copy-pastable example if possible</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Note:  This is not real Python code.  I can't reproduce these problems with toy data, but they
# show up consistently with certain sets of real data.

from pandas import Series
vocabulary = Series(data = &lt;a few thousand integers&gt;, index = &lt;a few thousand words/tokens, including u&quot;null&quot;&gt;)
new_vocab = Series(data = &lt;a smaller list of integers&gt;, index = &lt;a smaller list of words, mostly overlapping with the first one, also including u&quot;null&quot;&gt;)
new_words = new_vocab.index.difference(vocabulary.index)

print u&quot;null&quot; is in vocabulary.index
print u&quot;null&quot; is in new_vocab.index
print u&quot;null&quot; is in new_words

&gt; True
&gt; True
&gt; True


from pandas import DataFrame
matrix1 = DataFrame(data = &lt;a bunch of numbers&gt;, index = &lt;list of topic names&gt;, columns &lt;list of words/tokens, _not_ including NaN or u&quot;nan&quot;&gt;)
matrix2 = DataFrame(data = &lt;a bunch of numbers&gt;, index = &lt;list of topic names&gt;, columns &lt;list of words/tokens, _not_ including NaN or u&quot;nan&quot;&gt;)
matrix3 = matrix1.multiply(matrix2)

from numpy import NaN
print NaN in matrix1.columns
print u&quot;nan&quot; in matrix1.columns
print NaN in matrix2.columns
print u&quot;nan&quot; in matrix2.columns
print NaN in matrix3.columns
print u&quot;nan&quot; in matrix3.columns

&gt; False
&gt; False
&gt; False
&gt; False
&gt; True
&gt; True"><pre class="notranslate"><span class="pl-c"># Note:  This is not real Python code.  I can't reproduce these problems with toy data, but they</span>
<span class="pl-c"># show up consistently with certain sets of real data.</span>

<span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">Series</span>
<span class="pl-s1">vocabulary</span> <span class="pl-c1">=</span> <span class="pl-v">Series</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-s1">few</span> <span class="pl-s1">thousand</span> <span class="pl-s1">integers</span><span class="pl-c1">&gt;</span>, <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-s1">few</span> <span class="pl-s1">thousand</span> <span class="pl-s1">words</span><span class="pl-c1">/</span><span class="pl-s1">tokens</span>, <span class="pl-s1">including</span> <span class="pl-s">u"null"</span><span class="pl-c1">&gt;</span>)
<span class="pl-s1">new_vocab</span> <span class="pl-c1">=</span> <span class="pl-v">Series</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-s1">smaller</span> <span class="pl-s1">list</span> <span class="pl-s1">of</span> <span class="pl-s1">integers</span><span class="pl-c1">&gt;</span>, <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-s1">smaller</span> <span class="pl-s1">list</span> <span class="pl-s1">of</span> <span class="pl-s1">words</span>, <span class="pl-s1">mostly</span> <span class="pl-s1">overlapping</span> <span class="pl-k">with</span> <span class="pl-s1">the</span> <span class="pl-s1">first</span> <span class="pl-s1">one</span>, <span class="pl-s1">also</span> <span class="pl-s1">including</span> <span class="pl-s">u"null"</span><span class="pl-c1">&gt;</span>)
<span class="pl-s1">new_words</span> <span class="pl-c1">=</span> <span class="pl-s1">new_vocab</span>.<span class="pl-s1">index</span>.<span class="pl-en">difference</span>(<span class="pl-s1">vocabulary</span>.<span class="pl-s1">index</span>)

<span class="pl-k">print</span> <span class="pl-s">u"null"</span> <span class="pl-c1">is</span> <span class="pl-s1">in</span> <span class="pl-s1">vocabulary</span>.<span class="pl-s1">index</span>
<span class="pl-k">print</span> <span class="pl-s">u"null"</span> <span class="pl-c1">is</span> <span class="pl-s1">in</span> <span class="pl-s1">new_vocab</span>.<span class="pl-s1">index</span>
<span class="pl-k">print</span> <span class="pl-s">u"null"</span> <span class="pl-c1">is</span> <span class="pl-s1">in</span> <span class="pl-s1">new_words</span>

<span class="pl-c1">&gt;</span> <span class="pl-c1">True</span><span class="pl-s1"></span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">True</span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">True</span>


<span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">DataFrame</span>
<span class="pl-s1">matrix1</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-s1">bunch</span> <span class="pl-s1">of</span> <span class="pl-s1">numbers</span><span class="pl-c1">&gt;</span>, <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">list</span> <span class="pl-s1">of</span> <span class="pl-s1">topic</span> <span class="pl-s1">names</span><span class="pl-c1">&gt;</span>, <span class="pl-s1">columns</span> <span class="pl-c1">&lt;</span><span class="pl-s1">list</span> <span class="pl-s1">of</span> <span class="pl-s1">words</span><span class="pl-c1">/</span><span class="pl-s1">tokens</span>, <span class="pl-s1">_not_</span> <span class="pl-s1">including</span> <span class="pl-v">NaN</span> <span class="pl-c1">or</span> <span class="pl-s">u"nan"</span><span class="pl-c1">&gt;</span>)
<span class="pl-s1">matrix2</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>(<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-s1">bunch</span> <span class="pl-s1">of</span> <span class="pl-s1">numbers</span><span class="pl-c1">&gt;</span>, <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-s1">list</span> <span class="pl-s1">of</span> <span class="pl-s1">topic</span> <span class="pl-s1">names</span><span class="pl-c1">&gt;</span>, <span class="pl-s1">columns</span> <span class="pl-c1">&lt;</span><span class="pl-s1">list</span> <span class="pl-s1">of</span> <span class="pl-s1">words</span><span class="pl-c1">/</span><span class="pl-s1">tokens</span>, <span class="pl-s1">_not_</span> <span class="pl-s1">including</span> <span class="pl-v">NaN</span> <span class="pl-c1">or</span> <span class="pl-s">u"nan"</span><span class="pl-c1">&gt;</span><span class="pl-s1"></span>)
<span class="pl-s1">matrix3</span> <span class="pl-c1">=</span> <span class="pl-s1">matrix1</span>.<span class="pl-en">multiply</span>(<span class="pl-s1">matrix2</span>)

<span class="pl-k">from</span> <span class="pl-s1">numpy</span> <span class="pl-k">import</span> <span class="pl-v">NaN</span>
<span class="pl-k">print</span> <span class="pl-v">NaN</span> <span class="pl-c1">in</span> <span class="pl-s1">matrix1</span>.<span class="pl-s1">columns</span>
<span class="pl-k">print</span> <span class="pl-s">u"nan"</span> <span class="pl-c1">in</span> <span class="pl-s1">matrix1</span>.<span class="pl-s1">columns</span>
<span class="pl-k">print</span> <span class="pl-v">NaN</span> <span class="pl-c1">in</span> <span class="pl-s1">matrix2</span>.<span class="pl-s1">columns</span>
<span class="pl-k">print</span> <span class="pl-s">u"nan"</span> <span class="pl-c1">in</span> <span class="pl-s1">matrix2</span>.<span class="pl-s1">columns</span>
<span class="pl-k">print</span> <span class="pl-v">NaN</span> <span class="pl-c1">in</span> <span class="pl-s1">matrix3</span>.<span class="pl-s1">columns</span>
<span class="pl-k">print</span> <span class="pl-s">u"nan"</span> <span class="pl-c1">in</span> <span class="pl-s1">matrix3</span>.<span class="pl-s1">columns</span><span class="pl-s1"></span>

<span class="pl-c1">&gt;</span> <span class="pl-c1">False</span><span class="pl-s1"></span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">False</span><span class="pl-s1"></span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">False</span><span class="pl-s1"></span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">False</span><span class="pl-s1"></span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">True</span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">True</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">This may be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="285106859" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18988" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/18988/hovercard" href="https://github.com/pandas-dev/pandas/issues/18988">#18988</a>.</p>
<p dir="auto">I feel bad about reporting these bugs, because I can't duplicate them outside actual scripts with actual (rather voluminous) data.  The first common denominator to all the issues is that when I perform operations involving two objects, I end up with extra columns (in DataFrames) or elements (in Series or Indexes):  sometimes duplicates of existing columns (but the second, duplicate column will contain all null values), sometimes entirely new columns/elements.</p>
<p dir="auto">The second common denominator is that every case seems to involve "null-like" index values:  NaN, u"nan", u"null", u"n/a", and u"null.1.1" are the ones I've actually observed.  In one case, u"null" creates a problem; in another u"null" works just fine, while u"n/a" and u"null.1.1" create problems (but u"null.1" doesn't).  In a third case, the null-like values don't exist in the original objects, but show up after an operation, as new columns (interestingly, in this case, under pandas 20.3 I got two columns, NaN, and u"nan", while in pandas 22.0, I get those two plus u"n/a"--or actually, the "len" function is telling me there are four extra columns, but I using a "difference" method only gives me a list of three)--and they show up with some sets of data but not others.</p>
<p dir="auto">In each case where errors have shown up, I've added code to check for them and remove the spurious columns/elements, but it's been very frustrating to run down different problem that can occur.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]<br>
INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.14.final.0<br>
python-bits: 64<br>
OS: Windows<br>
OS-release: 10<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.20.3<br>
pytest: 3.2.1<br>
pip: 9.0.1<br>
setuptools: 38.4.0<br>
Cython: 0.26.1<br>
numpy: 1.13.3<br>
scipy: 1.0.0<br>
xarray: None<br>
IPython: 5.4.1<br>
sphinx: 1.6.3<br>
patsy: 0.4.1<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.4.2<br>
numexpr: 2.6.4<br>
feather: None<br>
matplotlib: 2.1.0<br>
openpyxl: 2.4.8<br>
xlrd: 1.1.0<br>
xlwt: 1.3.0<br>
xlsxwriter: 1.0.2<br>
lxml: 4.1.0<br>
bs4: 4.6.0<br>
html5lib: 1.0.1<br>
sqlalchemy: 1.1.13<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>