<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="series_list = [pd.Series({&quot;a&quot;: 1}), pd.Series({&quot;b&quot;: 2}), pd.Series({&quot;c&quot;: 3})]
print(pd.concat(series_list, verify_integrity=True))  # This works fine

# Raises TypeError 
print(pd.concat(series_list, keys=[&quot;red&quot;, &quot;red&quot;, &quot;red&quot;]))

# Does NOT raise an exception without verify_integirty.
# However, the object `pd.concat` returns is broken (see below for details).
print(pd.concat(series_list, keys=[&quot;red&quot;, &quot;blue&quot;, &quot;red&quot;]))

# Raises ValueError
print(pd.concat(
    series_list, keys=[&quot;red&quot;, &quot;blue&quot;, &quot;red&quot;],
    verify_integrity=True)) "><pre class="notranslate"><span class="pl-s1">series_list</span> <span class="pl-c1">=</span> [<span class="pl-s1">pd</span>.<span class="pl-v">Series</span>({<span class="pl-s">"a"</span>: <span class="pl-c1">1</span>}), <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>({<span class="pl-s">"b"</span>: <span class="pl-c1">2</span>}), <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>({<span class="pl-s">"c"</span>: <span class="pl-c1">3</span>})]
<span class="pl-en">print</span>(<span class="pl-s1">pd</span>.<span class="pl-en">concat</span>(<span class="pl-s1">series_list</span>, <span class="pl-s1">verify_integrity</span><span class="pl-c1">=</span><span class="pl-c1">True</span>))  <span class="pl-c"># This works fine</span>

<span class="pl-c"># Raises TypeError </span>
<span class="pl-en">print</span>(<span class="pl-s1">pd</span>.<span class="pl-en">concat</span>(<span class="pl-s1">series_list</span>, <span class="pl-s1">keys</span><span class="pl-c1">=</span>[<span class="pl-s">"red"</span>, <span class="pl-s">"red"</span>, <span class="pl-s">"red"</span>]))

<span class="pl-c"># Does NOT raise an exception without verify_integirty.</span>
<span class="pl-c"># However, the object `pd.concat` returns is broken (see below for details).</span>
<span class="pl-en">print</span>(<span class="pl-s1">pd</span>.<span class="pl-en">concat</span>(<span class="pl-s1">series_list</span>, <span class="pl-s1">keys</span><span class="pl-c1">=</span>[<span class="pl-s">"red"</span>, <span class="pl-s">"blue"</span>, <span class="pl-s">"red"</span>]))

<span class="pl-c"># Raises ValueError</span>
<span class="pl-en">print</span>(<span class="pl-s1">pd</span>.<span class="pl-en">concat</span>(
    <span class="pl-s1">series_list</span>, <span class="pl-s1">keys</span><span class="pl-c1">=</span>[<span class="pl-s">"red"</span>, <span class="pl-s">"blue"</span>, <span class="pl-s">"red"</span>],
    <span class="pl-s1">verify_integrity</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)) </pre></div>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Since the indices of the Series don't conflict, it should be fine to use the same key for several rows (after all, it works fine without any keys at all). None of these calls should raise an exception and the objects they return should not be broken (see below for what I mean). Expected output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a    1
b    2
c    3
dtype: int64
red  a    1
red   b    2
red  c    3
dtype: int64
red  a    1
blue   b    2
red  c    3
dtype: int64"><pre class="notranslate"><code class="notranslate">a    1
b    2
c    3
dtype: int64
red  a    1
red   b    2
red  c    3
dtype: int64
red  a    1
blue   b    2
red  c    3
dtype: int64
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">This is similar to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="310200776" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/20565" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/20565/hovercard" href="https://github.com/pandas-dev/pandas/issues/20565">#20565</a> (but even worse, IMO). I think the problem is that <code class="notranslate">pd.concat</code> creates a Series with duplicate entries in its index. This is illustrated by the broken object one of the above calls creates:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt; broken = pd.concat(series_list, keys=[&quot;red&quot;, &quot;blue&quot;, &quot;red&quot;])
&gt; broken.index  # Below, `levels[0]` should contain one u'red', not two.
MultiIndex(levels=[[u'red', u'blue', u'red'], [u'a', u'b', u'c']],
           labels=[[1, 0, 1, 1, 1, 0, 1], [0, 1, 2]])"><pre class="notranslate"><span class="pl-c1">&gt;</span> <span class="pl-s1">broken</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">concat</span>(<span class="pl-s1">series_list</span>, <span class="pl-s1">keys</span><span class="pl-c1">=</span>[<span class="pl-s">"red"</span>, <span class="pl-s">"blue"</span>, <span class="pl-s">"red"</span>])
<span class="pl-c1">&gt;</span> <span class="pl-s1">broken</span>.<span class="pl-s1">index</span>  <span class="pl-c"># Below, `levels[0]` should contain one u'red', not two.</span>
<span class="pl-v">MultiIndex</span>(<span class="pl-s1">levels</span><span class="pl-c1">=</span>[[<span class="pl-s">u'red'</span>, <span class="pl-s">u'blue'</span>, <span class="pl-s">u'red'</span>], [<span class="pl-s">u'a'</span>, <span class="pl-s">u'b'</span>, <span class="pl-s">u'c'</span>]],
           <span class="pl-s1">labels</span><span class="pl-c1">=</span>[[<span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]])</pre></div>
<p dir="auto">Lots of operations fail on this object. For instance,  <code class="notranslate">broken.sort_index()</code>   raises "ValueError: operands could not be broadcast together with shapes (7,) (3,) (7,)".</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.6.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.3.5-smp-811.22.0.0<br>
machine: x86_64<br>
processor:<br>
byteorder: little<br>
LC_ALL: en_US.UTF-8<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: None<br>
pip: None<br>
setuptools: None<br>
Cython: None<br>
numpy: 1.13.3<br>
scipy: 1.0.0<br>
pyarrow: None<br>
xarray: None<br>
IPython: 2.0.0<br>
sphinx: None<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: None<br>
tables: 3.1.1<br>
numexpr: 2.5<br>
feather: None<br>
matplotlib: 1.5.2<br>
openpyxl: None<br>
xlrd: 0.9.3<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>
<p dir="auto">Truncating a series with a PeriodIndex with unique entries works fine:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [4]: pdi = pd.PeriodIndex([pd.Period('2017-09-01'),
   ...:                       pd.Period('2017-09-02'),
   ...:                       pd.Period('2017-09-03')])
   ...: ser = pd.Series([1,2,3], index=pdi)
   ...: ser
Out[4]:
2017-09-01    1
2017-09-02    2
2017-09-03    3
Freq: D, dtype: int64

In [5]: ser.truncate(after='2017-09-02')
Out[5]:
2017-09-01    1
2017-09-02    2
Freq: D, dtype: int64"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">pdi</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">PeriodIndex</span>([<span class="pl-s1">pd</span>.<span class="pl-v">Period</span>(<span class="pl-s">'2017-09-01'</span>),
   ...:                       <span class="pl-s1">pd</span>.<span class="pl-v">Period</span>(<span class="pl-s">'2017-09-02'</span>),
   ...:                       <span class="pl-s1">pd</span>.<span class="pl-v">Period</span>(<span class="pl-s">'2017-09-03'</span>)])
   ...: <span class="pl-s1">ser</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pdi</span>)
   ...: <span class="pl-s1">ser</span>
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]:
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">01</span>    <span class="pl-c1">1</span>
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">2</span>
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">03</span>    <span class="pl-c1">3</span>
<span class="pl-v">Freq</span>: <span class="pl-v">D</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>

<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">ser</span>.<span class="pl-en">truncate</span>(<span class="pl-s1">after</span><span class="pl-c1">=</span><span class="pl-s">'2017-09-02'</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]:
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">01</span>    <span class="pl-c1">1</span>
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">2</span>
<span class="pl-v">Freq</span>: <span class="pl-v">D</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div>
<p dir="auto">But truncating a series with a PeriodIndex with non-unique entries does not</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [6]: pdi2 = pd.PeriodIndex([pd.Period('2017-09-02'),
   ...:                        pd.Period('2017-09-02'),
   ...:                        pd.Period('2017-09-03')])
   ...: ser2 = pd.Series([1,2,3], index=pdi2)
   ...: ser2
   ...:
Out[6]:
2017-09-02    1
2017-09-02    2
2017-09-03    3
Freq: D, dtype: int64

In [7]: ser2.truncate(after='2017-09-02')"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">pdi2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">PeriodIndex</span>([<span class="pl-s1">pd</span>.<span class="pl-v">Period</span>(<span class="pl-s">'2017-09-02'</span>),
   ...:                        <span class="pl-s1">pd</span>.<span class="pl-v">Period</span>(<span class="pl-s">'2017-09-02'</span>),
   ...:                        <span class="pl-s1">pd</span>.<span class="pl-v">Period</span>(<span class="pl-s">'2017-09-03'</span>)])
   ...: <span class="pl-s1">ser2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pdi2</span>)
   ...: <span class="pl-s1">ser2</span>
   ...:
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]:
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">1</span>
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">2</span>
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">03</span>    <span class="pl-c1">3</span>
<span class="pl-v">Freq</span>: <span class="pl-v">D</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span>

<span class="pl-v">In</span> [<span class="pl-c1">7</span>]: <span class="pl-s1">ser2</span>.<span class="pl-en">truncate</span>(<span class="pl-s1">after</span><span class="pl-c1">=</span><span class="pl-s">'2017-09-02'</span>)</pre></div>
<p dir="auto">This fails with a <code class="notranslate">TypeError: Cannot compare type 'Period' with type 'int'</code>.</p>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="2017-09-02    1
2017-09-02    2
Freq: D, dtype: int64"><pre class="notranslate"><span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">1</span>
<span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">2</span>
<span class="pl-v">Freq</span>: <span class="pl-v">D</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.1.final.0<br>
python-bits: 32<br>
OS: Windows<br>
OS-release: 7<br>
machine: x86<br>
processor: x86 Family 6 Model 42 Stepping 7, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.20.1<br>
pytest: 3.0.7<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: 0.19.0<br>
xarray: None<br>
IPython: 5.3.0<br>
sphinx: 1.5.6<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.2.2<br>
numexpr: 2.6.2<br>
feather: 0.3.1<br>
matplotlib: 2.0.2<br>
openpyxl: 2.4.7<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.3<br>
bs4: 4.6.0<br>
html5lib: 0.999<br>
sqlalchemy: 1.1.9<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>