Issue 1:
Code Sample, a copy-pastable example if possible

series_list = [pd.Series({"a": 1}), pd.Series({"b": 2}), pd.Series({"c": 3})]
print(pd.concat(series_list, verify_integrity=True)) # This works fine

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

# 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=["red", "blue", "red"]))

# Raises ValueError
print(pd.concat(
series_list, keys=["red", "blue", "red"],
verify_integrity=True))

Expected Output

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:

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

Problem description

This is similar to issue #20565 (but even worse, IMO). I think the problem is that pd.concat creates a Series with duplicate entries in its index. This is illustrated by the broken object one of the above calls creates:

> broken = pd.concat(series_list, keys=["red", "blue", "red"])
> 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]])

Lots of operations fail on this object. For instance, broken.sort_index() raises "ValueError: operands could not be broadcast together with shapes (7,) (3,) (7,)".

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.6.final.0

python-bits: 64

OS: Linux

OS-release: 4.3.5-smp-811.22.0.0

machine: x86_64

processor:

byteorder: little

LC_ALL: en_US.UTF-8

LANG: None

LOCALE: None.None

pandas: 0.22.0

pytest: None

pip: None

setuptools: None

Cython: None

numpy: 1.13.3

scipy: 1.0.0

pyarrow: None

xarray: None

IPython: 2.0.0

sphinx: None

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2018.3

blosc: None

bottleneck: None

tables: 3.1.1

numexpr: 2.5

feather: None

matplotlib: 1.5.2

openpyxl: None

xlrd: 0.9.3

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.8

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
Truncating a series with a PeriodIndex with unique entries works fine:

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

But truncating a series with a PeriodIndex with non-unique entries does not

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')

This fails with a TypeError: Cannot compare type 'Period' with type 'int'.

Expected Output

2017-09-02 1
2017-09-02 2
Freq: D, dtype: int64

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.1.final.0

python-bits: 32

OS: Windows

OS-release: 7

machine: x86

processor: x86 Family 6 Model 42 Stepping 7, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.20.1

pytest: 3.0.7

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.25.2

numpy: 1.12.1

scipy: 0.19.0

xarray: None

IPython: 5.3.0

sphinx: 1.5.6

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: 1.2.1

tables: 3.2.2

numexpr: 2.6.2

feather: 0.3.1

matplotlib: 2.0.2

openpyxl: 2.4.7

xlrd: 1.0.0

xlwt: 1.2.0

xlsxwriter: 0.9.6

lxml: 3.7.3

bs4: 4.6.0

html5lib: 0.999

sqlalchemy: 1.1.9

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None