diff --git a/pandas/tseries/period.py b/pandas/tseries/period.py index b4d8a6547950d..6fde54a3eeb9b 100644 --- a/pandas/tseries/period.py +++ b/pandas/tseries/period.py @@ -683,6 +683,11 @@ def _from_arraylike(cls, data, freq, tz): if freq is None and len(data) > 0: freq = getattr(data[0], 'freq', None) + if freq is None: + try: + freq = getattr(Period(data[0]), 'freq', None) + except Exception: + pass if freq is None: raise ValueError('freq not specified and cannot be ' @@ -702,6 +707,11 @@ def _from_arraylike(cls, data, freq, tz): else: if freq is None and len(data) > 0: freq = getattr(data[0], 'freq', None) + if freq is None: + try: + freq = getattr(Period(data[0]), 'freq', None) + except Exception: + pass if freq is None: raise ValueError('freq not specified and cannot be '