fixing https://github.com/pydata/pandas/issues/5372
Merge pull request #5376 from RomanPekar/periodIndex-repr

repr for PeriodIndex does not handle <=2 elements well (GH5372)