§
    �’jsÀ  ã                  óÚ  — d dl mZ d dlmZ d dlZd dlmZmZmZm	Z	m
Z
mZmZ d dlZd dlZd dlmZmZ d dlmZ d dlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z$m%Z% d dl&m'Z'm(Z( d d	l)m*Z* d d
l+m,Z,m-Z- d dl.m/Z/m0Z0m1Z1m2Z2m3Z3 d dl4m5Z5m6Z6m7Z7 d dl8m9Z9m:Z: d dl;m<Z<m=Z= d dl>m?Z?m@Z@mAZAmBZB d dlCmDZD d dlEmFZG d dlHmIc mJZK er0d dlLmMZMmNZN d dlOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZW d dl;mXZX d dlEmYZYmZZZ d dl[m\Z\  e
de¬¦  «        Z]ddiZ^d=d>d„Z_ e7d ¦  «         G d!„ deGj`        e$ja        ¦  «        ¦   «         Zbd?d$„Zc	 	 d@dAd,„ZdedBd-„¦   «         ZeedCd0„¦   «         ZedDd2„Ze	 d=dEd4„ZdFdGd8„Zf	 	 	 	 	 	 	 	 dHdId:„ZgdJd<„ZhdS )Ké    )Úannotations)Ú	timedeltaN)ÚTYPE_CHECKINGÚAnyÚLiteralÚSelfÚTypeVarÚcastÚoverload)ÚalgosÚlib)ÚNDArrayBacked)Ú
BaseOffsetÚDayÚNaTÚNaTTypeÚ	TimedeltaÚadd_overflowsafeÚastype_overflowsafeÚdt64arr_to_periodarrÚget_unit_from_dtypeÚiNaTÚparsingÚperiodÚ	to_offset)Ú	FreqGroupÚPeriodDtypeBase)Úisleapyear_arr)ÚTickÚdelta_to_tick)ÚDIFFERENT_FREQÚIncompatibleFrequencyÚPeriodÚget_period_field_arrÚperiod_asfreq_arr)Úcache_readonlyÚdocÚ
set_module)Úensure_objectÚpandas_dtype)ÚDatetimeTZDtypeÚPeriodDtype)ÚABCIndexÚABCPeriodIndexÚ	ABCSeriesÚABCTimedeltaArray)Úisna)Údatetimelike)ÚCallableÚSequence)ÚAnyArrayLikeÚDtypeÚDtypeObjÚFillnaOptionsÚNpDtypeÚNumpySorterÚNumpyValueArrayLikeÚnpt)ÚExtensionDtype)ÚDatetimeArrayÚTimedeltaArray)ÚExtensionArrayÚBaseOffsetT)ÚboundÚklassÚPeriodArrayÚnameÚstrÚ	docstringú
str | Nonec                óH   ‡ — ˆ fd„}‰ |_         ||_        t          |¦  «        S )Nc                óL   •— | j         j        }t          ‰| j        |¦  «        }|S ©N)ÚdtypeÚ_dtype_coder$   Úasi8)ÚselfÚbaseÚresultrE   s      €úGC:\Projects\DSCons\.venv\Lib\site-packages\pandas\core\arrays\period.pyÚfz_field_accessor.<locals>.fr   s%   ø€ ØŒzÔ%ˆÝ% d¨D¬I°tÑ<Ô<ˆØˆó    )Ú__name__Ú__doc__Úproperty)rE   rG   rS   s   `  rR   Ú_field_accessorrX   q   s8   ø€ ðð ð ð ð ð
 €A„JØ€A„IÝ�A‰;Œ;ÐrT   zpandas.arraysc                  ó  ‡ — e Zd ZU dZdZdZ ej        e¦  «        Z	e
fZd„ Zded<   dZed�d
„¦   «         Zg Zded<   dgZded<   g d¢Zded<   g d¢Zded<   eez   ez   Zded<   g d¢Zded<   ded<   dŽd�d„Zed�d#„¦   «         Zeddd$œd‘d%„¦   «         Zedd&œd’d(„¦   «         Zed“d”d)„¦   «         Zed*„ ¦   «         Zed•d-„¦   «         Zd–d1„Zd—d4„Z d˜d7„Z!e"d™d8„¦   «         Z#edšd:„¦   «         Z$ed›d;„¦   «         Z%	 dœd�d?„Z&d“d@„Z' e(dAdB¦  «        Z) e(dCdD¦  «        Z* e(dEdF¦  «        Z+ e(dGdH¦  «        Z, e(dIdJ¦  «        Z- e(dKdL¦  «        Z. e(dMdN¦  «        Z/e/Z0 e(dOdP¦  «        Z1e1Z2e2Z3 e(dQdR¦  «        xZ4Z5 e(dSdT¦  «        Z6 e(dUdV¦  «        Z7 e(dWdX¦  «        Z8e8Z9edždZ„¦   «         Z:dŸd d^„Z;d¡d_„Z< e=d¢i e>¤d`d`daœ¤Žd£d¤dc„¦   «         Z?d¥d¦df„Z@dgddhœd§dl„ZAd¨d©ˆ fdn„ZB	 	 dªd«dv„ZCdddmdwœd¬d~„ZDd­d‚„ZEd®dƒ„ZFˆ fd„„ZGd¯d†„ZHd‡„ ZIdmddˆœd°ˆ fdŒ„ZJˆ xZKS )±rD   a^  
    Pandas ExtensionArray for storing Period data.

    Users should use :func:`~pandas.array` to create new instances.

    Parameters
    ----------
    values : Union[PeriodArray, Series[period], ndarray[int], PeriodIndex]
        The data to store. These should be arrays that can be directly
        converted to ordinals without inference or copy (PeriodArray,
        ndarray[int64]), or a box around such an array (Series[period],
        PeriodIndex).
    dtype : PeriodDtype, optional
        A PeriodDtype instance from which to extract a `freq`. If both
        `freq` and `dtype` are specified, then the frequencies must match.
    copy : bool, default False
        Whether to copy the ordinals before storing.

    Attributes
    ----------
    None

    Methods
    -------
    None

    See Also
    --------
    Period: Represents a period of time.
    PeriodIndex : Immutable Index for period data.
    period_range: Create a fixed-frequency PeriodArray.
    array: Construct a pandas array.

    Notes
    -----
    There are two components to a PeriodArray

    - ordinals : integer ndarray
    - freq : pd.tseries.offsets.Offset

    The values are physically stored as a 1-D ndarray of integers. These are
    called "ordinals" and represent some kind of offset from a base.

    The `freq` indicates the span covered by each element of the array.
    All elements in the PeriodArray have the same `freq`.

    Examples
    --------
    >>> pd.arrays.PeriodArray(pd.PeriodIndex(["2023-01-01", "2023-01-02"], freq="D"))
    <PeriodArray>
    ['2023-01-01', '2023-01-02']
    Length: 2, dtype: period[D]
    iè  Úperiodarrayc                ó,   — t          | t          ¦  «        S rK   )Ú
isinstancer,   )Úxs    rR   ú<lambda>zPeriodArray.<lambda>»   s   € ÅØ	�;ñBô B€ rT   zCallable[[DtypeObj], bool]Ú_is_recognized_dtype)r   Úreturnútype[Period]c                ó   — t           S rK   )r#   ©rO   s    rR   Ú_scalar_typezPeriodArray._scalar_typeÀ   s   € åˆrT   z	list[str]Ú
_other_opsÚis_leap_yearÚ	_bool_ops)Ú
start_timeÚend_timeÚfreqÚ_object_ops)ÚyearÚmonthÚdayÚhourÚminuteÚsecondÚ
weekofyearÚweekdayÚweekÚ	dayofweekÚday_of_weekÚ	dayofyearÚday_of_yearÚquarterÚqyearÚdays_in_monthÚdaysinmonthÚ
_field_opsÚ_datetimelike_ops)ÚstrftimeÚto_timestampÚasfreqÚ_datetimelike_methodsr,   Ú_dtypeNFrL   úDtype | NoneÚcopyÚboolÚNonec                ó´  — |�7t          |¦  «        }t          |t          ¦  «        st          d|› d�¦  «        ‚t          |t          ¦  «        r4|j        }t          |t          | ¦  «        ¦  «        st          d¦  «        ‚nt          |t          ¦  «        r|j        }t          |t          | ¦  «        ¦  «        r0|� ||j	        k    rt          ||j        ¦  «        ‚|j        |j	        }}|st          j        |d¬¦  «        }nt          j        |d|¬¦  «        }|€t          d¦  «        ‚t!          t          |¦  «        }t#          j        | ||¦  «         d S )NzInvalid dtype z for PeriodArrayzIncorrect dtypeÚint64©rL   ©rL   r…   z-dtype is not specified and cannot be inferred)r*   r\   r,   Ú
ValueErrorr/   Ú_valuesÚtypeÚ	TypeErrorr.   rL   Úraise_on_incompatiblerj   Ú_ndarrayÚnpÚasarrayÚarrayr
   r   Ú__init__)rO   ÚvaluesrL   r…   s       rR   r•   zPeriodArray.__init__ã   s^  € ØÐÝ  Ñ'Ô'ˆEÝ˜e¥[Ñ1Ô1ð KÝ Ð!I°%Ð!IÐ!IÐ!IÑJÔJÐJå�f�iÑ(Ô(ð 	$Ø”^ˆFÝ˜f¥d¨4¡j¤jÑ1Ô1ð 3ÝÐ 1Ñ2Ô2Ð2ð3õ ˜¥Ñ/Ô/ð 	$Ø”^ˆFå�f�d 4™jœjÑ)Ô)ð 	:ØÐ  U¨f¬lÒ%:Ð%:Ý+¨F°E´JÑ?Ô?Ð?Ø"œO¨V¬\�EˆFàð 	@Ý”Z ¨gÐ6Ñ6Ô6ˆFˆFå”X˜f¨G¸$Ð?Ñ?Ô?ˆFØˆ=ÝÐLÑMÔMÐMÝ•[ %Ñ(Ô(ˆÝÔ˜t V¨UÑ3Ô3Ð3Ð3Ð3rT   r–   únpt.NDArray[np.int64]r   c                ó~   — d}t          |t          j        ¦  «        r|j        dk    s
J |¦   «         ‚ | ||¬¦  «        S )Nz Should be numpy array of type i8Úi8rŠ   )r\   r’   ÚndarrayrL   )Úclsr–   rL   Úassertion_msgs       rR   Ú_simple_newzPeriodArray._simple_new   sJ   € ð ;ˆÝ˜&¥"¤*Ñ-Ô-ÐU°&´,À$Ò2FÐ2FÐ2FÈÑ2FÔ2FÐFØˆs�6 Ð'Ñ'Ô'Ð'rT   r‹   c               ó¤  — |�t          |¦  «        }|rt          |t          ¦  «        r|j        }nd }t          || ¦  «        r-t	          |j        |¦  «         |r|                     ¦   «         }|S t          j        |t          ¬¦  «        }|pt          j        |¦  «        }t          j        ||¦  «        }t          |¦  «        } | ||¬¦  «        S )NrŠ   )r*   r\   r,   rj   Úvalidate_dtype_freqrL   r…   r’   r“   ÚobjectÚ	libperiodÚextract_freqÚextract_ordinals)r›   ÚscalarsrL   r…   rj   ÚperiodsÚordinalss          rR   Ú_from_sequencezPeriodArray._from_sequence  sÙ   € ð ÐÝ  Ñ'Ô'ˆEØð 	•Z ¥{Ñ3Ô3ð 	Ø”:ˆDˆDàˆDå�g˜sÑ#Ô#ð 	Ý ¤¨tÑ4Ô4Ð4Øð )Ø!Ÿ,š,™.œ.�ØˆNå”*˜W­FÐ3Ñ3Ô3ˆàÐ6•yÔ-¨gÑ6Ô6ˆÝÔ-¨g°tÑ<Ô<ˆÝ˜DÑ!Ô!ˆØˆs�8 5Ð)Ñ)Ô)Ð)rT   ©r…   r=   c               ó2   — |                       |||¬¦  «        S )Nr‹   )r§   )r›   ÚstringsrL   r…   s       rR   Ú_from_sequence_of_stringsz%PeriodArray._from_sequence_of_strings'  s   € ð ×!Ò! '°¸TÐ!ÑBÔBÐBrT   c                ó´   — t          |t          ¦  «        rt          |¦  «        j        }t	          |||¦  «        \  }}t          |¦  «        } | ||¬¦  «        S )a  
        Construct a PeriodArray from a datetime64 array

        Parameters
        ----------
        data : ndarray[datetime64[ns], datetime64[ns, tz]]
        freq : str or Tick
        tz : tzinfo, optional

        Returns
        -------
        PeriodArray[freq]
        rŠ   )r\   r   r,   Ú_freqstrr   )r›   Údatarj   ÚtzrL   s        rR   Ú_from_datetime64zPeriodArray._from_datetime64-  s]   € õ �d�JÑ'Ô'ð 	.Ý˜tÑ$Ô$Ô-ˆDÝ)¨$°°bÑ9Ô9‰
ˆˆdÝ˜DÑ!Ô!ˆØˆs�4˜uÐ%Ñ%Ô%Ð%rT   c                ó°   — t          j        |¦  «        }|�t          j        |¦  «        }|€|�t	          ||||¦  «        \  }}nt          d¦  «        ‚||fS )Nz/Not enough parameters to construct Period range)ÚdtlÚvalidate_periodsr#   Ú_maybe_convert_freqÚ_get_ordinal_rangerŒ   )r›   ÚstartÚendr¥   rj   Úsubarrs         rR   Ú_generate_rangezPeriodArray._generate_rangeB  sd   € åÔ& wÑ/Ô/ˆàÐÝÔ-¨dÑ3Ô3ˆDàÐ  Ý-¨e°S¸'À4ÑHÔH‰LˆF�D�DåÐNÑOÔOÐOà�tˆ|ÐrT   ÚfieldsÚdictc               óp   — t          dd|i|¤Ž\  }}t          |¦  «        }|                      ||¬¦  «        S )Nrj   rŠ   © )Ú_range_from_fieldsr,   r�   )r›   rº   rj   r¸   rL   s        rR   Ú_from_fieldszPeriodArray._from_fieldsP  sA   € å)Ð>Ð>¨tÐ>°vÐ>Ð>‰ˆ�Ý˜DÑ!Ô!ˆØ�Š˜v¨UˆÑ3Ô3Ð3rT   ÚvalueúPeriod | NaTTypeúnp.int64c                óò   — |t           u rt          j        |j        ¦  «        S t	          || j        ¦  «        r.|                      |¦  «         t          j        |j        ¦  «        S t          d|› d�¦  «        ‚)Nz!'value' should be a Period. Got 'z
' instead.)	r   r’   r‰   Ú_valuer\   rd   Ú_check_compatible_withÚordinalrŒ   ©rO   rÀ   s     rR   Ú_unbox_scalarzPeriodArray._unbox_scalar\  su   € ð •Cˆ<ˆ<å”8˜EœLÑ)Ô)Ð)Ý˜˜tÔ0Ñ1Ô1ð 	TØ×'Ò'¨Ñ.Ô.Ð.Ý”8˜EœMÑ*Ô*Ð*åÐRÀÐRÐRÐRÑSÔSÐSrT   rF   r#   c                ó.   — t          || j        ¬¦  «        S )N)rj   )r#   rj   rÇ   s     rR   Ú_scalar_from_stringzPeriodArray._scalar_from_stringi  s   € Ý�e $¤)Ð,Ñ,Ô,Ð,rT   ÚotherúPeriod | NaTType | PeriodArrayc                óP   — |t           u rd S |                      |j        ¦  «         d S rK   )r   Ú_require_matching_freqrj   ©rO   rË   s     rR   rÅ   z"PeriodArray._check_compatible_witho  s.   € Ø•Cˆ<ˆ<ØˆFð 	×#Ò# E¤JÑ/Ô/Ð/Ð/Ð/rT   c                ó   — | j         S rK   )rƒ   rc   s    rR   rL   zPeriodArray.dtypey  s
   € àŒ{ÐrT   r   c                ó   — | j         j        S )zC
        Return the frequency object for this PeriodArray.
        ©rL   rj   rc   s    rR   rj   zPeriodArray.freq~  s   € ð
 ŒzŒÐrT   c                ó4   — t          | j        ¦  «        j        S rK   )r,   rj   r­   rc   s    rR   ÚfreqstrzPeriodArray.freqstr…  s   € å˜4œ9Ñ%Ô%Ô.Ð.rT   úNpDtype | Noneúbool | Noneú
np.ndarrayc                ól  — |dk    ra|sDt          j        | j        |¬¦  «        }| j        r |                     ¦   «         }d|j        _        |S t          j        | j        |¬¦  «        S |du rt          d¦  «        ‚|t          k    r| j
         S t          j        t          | ¦  «        t          ¬¦  «        S )Nr™   rŠ   Fz:Unable to avoid copy while creating an array as requested.)r’   r“   rN   Ú	_readonlyÚviewÚflagsÚ	writeabler”   rŒ   r†   Ú_isnanÚlistr    )rO   rL   r…   rQ   s       rR   Ú	__array__zPeriodArray.__array__‰  sº   € ð �DŠ=ˆ=ð ð 8Ýœ D¤I°UÐ;Ñ;Ô;�Ø”>ð 3Ø#Ÿ[š[™]œ]�FØ-2�F”LÔ*Ø�å”x ¤	°Ð7Ñ7Ô7Ð7à�5ˆ=ˆ=ÝØLñô ð ð •DŠ=ˆ=Ø”K�<Ðõ Œx�˜T™
œ
­&Ð1Ñ1Ô1Ð1rT   c                ó  — ddl }ddlm} |��|j                             |¦  «        r/|                     | j        |                      ¦   «         |¬¦  «        S t          ||¦  «        r1| j	        |j
        k    r t          d| j	        › d|j
        › d�¦  «        ‚nt          d|› d	�¦  «        ‚ || j	        ¦  «        }|                     | j        |                      ¦   «         d
¬¦  «        }|j                             ||¦  «        S )z6
        Convert myself into a pyarrow Array.
        r   N)ÚArrowPeriodType)ÚmaskrŽ   zENot supported to convert PeriodArray to array with different 'freq' (z vs ú)z)Not supported to convert PeriodArray to 'z' typer‰   )ÚpyarrowÚ(pandas.core.arrays.arrow.extension_typesrá   ÚtypesÚ
is_integerr”   r‘   r1   r\   rÔ   rj   r�   r@   Úfrom_storage)rO   rŽ   rä   rá   Úperiod_typeÚstorage_arrays         rR   Ú__arrow_array__zPeriodArray.__arrow_array__£  s4  € ð 	ˆˆˆàLÐLÐLÐLÐLÐLàÐØŒ}×'Ò'¨Ñ-Ô-ð Ø—}’} T¤]¸¿º¹¼È4�}ÑPÔPÐPÝ˜D /Ñ2Ô2ð 
à”< 4¤9Ò,Ð,Ý#ðBØ#'¤<ðBð BØ59´YðBð Bð Bñô ð ð -õ  ØLÀÐLÐLÐLñô ð ð &�o d¤lÑ3Ô3ˆØŸš d¤m¸$¿)º)¹+¼+ÈG˜ÑTÔTˆØÔ%×2Ò2°;ÀÑNÔNÐNrT   rl   aN  
        The year of the period.

        See Also
        --------
        PeriodIndex.day_of_year : The ordinal day of the year.
        PeriodIndex.dayofyear : The ordinal day of the year.
        PeriodIndex.is_leap_year : Logical indicating if the date belongs to a
            leap year.
        PeriodIndex.weekofyear : The week ordinal of the year.
        PeriodIndex.year : The year of the period.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y")
        >>> idx.year
        Index([2023, 2024, 2025], dtype='int64')
        rm   a�  
        The month as January=1, December=12.

        See Also
        --------
        PeriodIndex.days_in_month : The number of days in the month.
        PeriodIndex.daysinmonth : The number of days in the month.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
        >>> idx.month
        Index([1, 2, 3], dtype='int64')
        rn   aÞ  
        The days of the period.

        See Also
        --------
        PeriodIndex.day_of_week : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.day_of_year : The ordinal day of the year.
        PeriodIndex.dayofweek : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.dayofyear : The ordinal day of the year.
        PeriodIndex.days_in_month : The number of days in the month.
        PeriodIndex.daysinmonth : The number of days in the month.
        PeriodIndex.weekday : The day of the week with Monday=0, Sunday=6.

        Examples
        --------
        >>> idx = pd.PeriodIndex(['2020-01-31', '2020-02-28'], freq='D')
        >>> idx.day
        Index([31, 28], dtype='int64')
        ro   a®  
        The hour of the period.

        See Also
        --------
        PeriodIndex.minute : The minute of the period.
        PeriodIndex.second : The second of the period.
        PeriodIndex.to_timestamp : Cast to DatetimeArray/Index.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01-01 10:00", "2023-01-01 11:00"], freq='h')
        >>> idx.hour
        Index([10, 11], dtype='int64')
        rp   aØ  
        The minute of the period.

        See Also
        --------
        PeriodIndex.hour : The hour of the period.
        PeriodIndex.second : The second of the period.
        PeriodIndex.to_timestamp : Cast to DatetimeArray/Index.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01-01 10:30:00",
        ...                       "2023-01-01 11:50:00"], freq='min')
        >>> idx.minute
        Index([30, 50], dtype='int64')
        rq   aÖ  
        The second of the period.

        See Also
        --------
        PeriodIndex.hour : The hour of the period.
        PeriodIndex.minute : The minute of the period.
        PeriodIndex.to_timestamp : Cast to DatetimeArray/Index.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01-01 10:00:30",
        ...                       "2023-01-01 10:00:31"], freq='s')
        >>> idx.second
        Index([30, 31], dtype='int64')
        rt   av  
        The week ordinal of the year.

        See Also
        --------
        PeriodIndex.day_of_week : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.dayofweek : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.week : The week ordinal of the year.
        PeriodIndex.weekday : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.year : The year of the period.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
        >>> idx.week  # It can be written `weekofyear`
        Index([5, 9, 13], dtype='int64')
        rv   a(  
        The day of the week with Monday=0, Sunday=6.

        See Also
        --------
        PeriodIndex.day : The days of the period.
        PeriodIndex.day_of_week : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.day_of_year : The ordinal day of the year.
        PeriodIndex.dayofweek : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.dayofyear : The ordinal day of the year.
        PeriodIndex.week : The week ordinal of the year.
        PeriodIndex.weekday : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.weekofyear : The week ordinal of the year.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01-01", "2023-01-02", "2023-01-03"], freq="D")
        >>> idx.weekday
        Index([6, 0, 1], dtype='int64')
        rx   aú  
        The ordinal day of the year.

        See Also
        --------
        PeriodIndex.day : The days of the period.
        PeriodIndex.day_of_week : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.day_of_year : The ordinal day of the year.
        PeriodIndex.dayofweek : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.dayofyear : The ordinal day of the year.
        PeriodIndex.weekday : The day of the week with Monday=0, Sunday=6.
        PeriodIndex.weekofyear : The week ordinal of the year.
        PeriodIndex.year : The year of the period.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01-10", "2023-02-01", "2023-03-01"], freq="D")
        >>> idx.dayofyear
        Index([10, 32, 60], dtype='int64')

        >>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y")
        >>> idx
        PeriodIndex(['2023', '2024', '2025'], dtype='period[Y-DEC]')
        >>> idx.dayofyear
        Index([365, 366, 365], dtype='int64')
        ry   ah  
        The quarter of the date.

        See Also
        --------
        PeriodIndex.qyear : Fiscal year the Period lies in according to its
            starting-quarter.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
        >>> idx.quarter
        Index([1, 1, 1], dtype='int64')
        rz   a�  
        Fiscal year the Period lies in according to its starting-quarter.

        The `year` and the `qyear` of the period will be the same if the fiscal
        and calendar years are the same. When they are not, the fiscal year
        can be different from the calendar year of the period.

        Returns
        -------
        int
            The fiscal year of the period.

        See Also
        --------
        PeriodIndex.quarter : The quarter of the date.
        PeriodIndex.year : The year of the period.

        Examples
        --------
        If the natural and fiscal year are the same, `qyear` and `year` will
        be the same.

        >>> per = pd.Period('2018Q1', freq='Q')
        >>> per.qyear
        2018
        >>> per.year
        2018

        If the fiscal year starts in April (`Q-MAR`), the first quarter of
        2018 will start in April 2017. `year` will then be 2017, but `qyear`
        will be the fiscal year, 2018.

        >>> per = pd.Period('2018Q1', freq='Q-MAR')
        >>> per.start_time
        Timestamp('2017-04-01 00:00:00')
        >>> per.qyear
        2018
        >>> per.year
        2017
        r{   a¢  
        The number of days in the month.

        See Also
        --------
        PeriodIndex.day : The days of the period.
        PeriodIndex.days_in_month : The number of days in the month.
        PeriodIndex.daysinmonth : The number of days in the month.
        PeriodIndex.month : The month as January=1, December=12.

        Examples
        --------
        For Series:

        >>> period = pd.period_range('2020-1-1 00:00', '2020-3-1 00:00', freq='M')
        >>> s = pd.Series(period)
        >>> s
        0   2020-01
        1   2020-02
        2   2020-03
        dtype: period[M]
        >>> s.dt.days_in_month
        0    31
        1    29
        2    31
        dtype: int64

        For PeriodIndex:

        >>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
        >>> idx.days_in_month   # It can be also entered as `daysinmonth`
        Index([31, 28, 31], dtype='int64')
        únpt.NDArray[np.bool_]c                óN   — t          t          j        | j        ¦  «        ¦  «        S )a²  
        Logical indicating if the date belongs to a leap year.

        See Also
        --------
        PeriodIndex.qyear : Fiscal year the Period lies in according to its
            starting-quarter.
        PeriodIndex.year : The year of the period.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y")
        >>> idx.is_leap_year
        array([False,  True, False])
        )r   r’   r“   rl   rc   s    rR   rf   zPeriodArray.is_leap_yearã  s   € õ" �bœj¨¬Ñ3Ô3Ñ4Ô4Ð4rT   r¶   Úhowr>   c                óÊ  — ddl m} t          j        |¦  «        }| j        j        dk    s|dk    rd}nd}|dk    }|r|dk    s| j        dk    r<t          dd¬	¦  «        t          d|¬	¦  «        z
  }|                      d
¬¦  «        |z   S t          d|¬	¦  «        }| | j        z                        d
¬¦  «        |z
  S |€3| j         	                    ¦   «         }t          |d¦  «        }|j        }|}	nt          j        |¦  «        }|j        }	|                      ||¬¦  «        }
t          j        |
j        |	¦  «        } |j        ||j        ¬¦  «        }|j        |k    sJ ‚| j        j        dk    rjt-          j        | j        ¦  «        }t1          |¦  «        dk    r<|d         }|| j        j        k    r| j        |_        n|dk    r| j        j        |_        |S |                     d¦  «        }|�pt9          |¦  «        }t;          |j        t<          ¦  «        rGt;          |t<          ¦  «        s2t          |¦  «        t          |j        j        ¬¦  «        k    r||_        |S )aÈ  
        Cast to DatetimeArray/Index.

        If possible, gives microsecond-unit DatetimeArray/Index. Otherwise
        gives nanosecond unit.

        Parameters
        ----------
        freq : str or DateOffset, optional
            Target frequency. The default is 'D' for week or longer,
            's' otherwise.
        how : {'s', 'e', 'start', 'end'}
            Whether to use the start or end of the time period being converted.

        Returns
        -------
        DatetimeArray/Index
            Timestamp representation of given Period-like object.

        See Also
        --------
        PeriodIndex.day : The days of the period.
        PeriodIndex.from_fields : Construct a PeriodIndex from fields
            (year, month, day, etc.).
        PeriodIndex.from_ordinals : Construct a PeriodIndex from ordinals.
        PeriodIndex.hour : The hour of the period.
        PeriodIndex.minute : The minute of the period.
        PeriodIndex.month : The month as January=1, December=12.
        PeriodIndex.second : The second of the period.
        PeriodIndex.year : The year of the period.

        Examples
        --------
        >>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
        >>> idx.to_timestamp()
        DatetimeIndex(['2023-01-01', '2023-02-01', '2023-03-01'],
        dtype='datetime64[us]', freq='MS')

        The frequency will not be inferred if the index contains less than
        three elements, or if the values of index are not strictly monotonic:

        >>> idx = pd.PeriodIndex(["2023-01", "2023-02"], freq="M")
        >>> idx.to_timestamp()
        DatetimeIndex(['2023-01-01', '2023-02-01'], dtype='datetime64[us]', freq=None)

        >>> idx = pd.PeriodIndex(
        ...     ["2023-01", "2023-02", "2023-02", "2023-03"], freq="2M"
        ... )
        >>> idx.to_timestamp()
        DatetimeIndex(['2023-01-01', '2023-02-01', '2023-02-01', '2023-03-01'],
        dtype='datetime64[us]', freq=None)
        r   )r>   ÚnsÚusÚEÚBé   ÚD)Úunitr¶   )rî   NrŠ   Úinfer©Údays) Úpandas.core.arraysr>   r¡   Úvalidate_end_aliasrj   rP   r   r€   rƒ   Ú_get_to_timestamp_baser   r­   r#   r´   Ú_period_dtype_coder�   Úperiodarr_to_dt64arrrN   r§   rL   rö   rE   ÚlibalgosÚunique_deltasÚlenÚ_nÚ_freqÚ
_with_freqr   r\   r   Ún)rO   rj   rî   r>   rö   r·   ÚadjustÚ	freq_coderL   rP   Únew_parrÚnew_dataÚdtaÚdiffsÚdiffs                  rR   r€   zPeriodArray.to_timestampö  sl  € ðj 	5Ð4Ð4Ð4Ð4Ð4åÔ*¨3Ñ/Ô/ˆàŒ9Œ>˜TÒ!Ð! T¨T¢\ \ØˆDˆDàˆDà�SŠjˆØð 	MØ�sŠ{ˆ{˜dœi¨3Ò.Ð.å" 1¨3Ð/Ñ/Ô/µ)¸AÀDÐ2IÑ2IÔ2IÑI�Ø×(Ò(¨WÐ(Ñ5Ô5¸Ñ>Ð>å" 1¨4Ð0Ñ0Ô0�Ø˜tœyÑ(×6Ò6¸7Ð6ÑCÔCÀfÑLÐLàˆ<Øœ×:Ò:Ñ<Ô<ˆIÝ# I¨qÑ1Ô1ˆEØ”>ˆDØˆDˆDåÔ-¨dÑ3Ô3ˆDØÔ*ˆDà—;’;˜t¨�;Ñ-Ô-ˆåÔ1°(´-ÀÑFÔFˆØ*ˆmÔ*¨8¸8¼>ÐJÑJÔJˆØŒx˜4ÒÐÐÐàŒ9Œ>˜SÒ Ð õ Ô*¨4¬9Ñ5Ô5ˆEÝ�5‰zŒz˜QŠˆØ˜Q”x�Ø˜4œ:œ=Ò(Ð(Ø $¤	�C”I�IØ˜Q’Y�YØ $¤	¤�C”IàˆJà—.’. Ñ)Ô)ˆCØÐÝ  ‘”�å˜sœx­Ñ-Ô-ð%å& t­SÑ1Ô1ð%õ " $™œ­9¸#¼(¼*Ð+EÑ+EÔ+EÒEÐEà $�C”IØˆJrT   c                ó8   — t          j        || j        ¬¦  «        S )N)rÆ   rj   )r#   Ú_from_ordinalrj   )rO   r]   s     rR   Ú	_box_funczPeriodArray._box_funcg  s   € ÝÔ#¨A°D´IÐ>Ñ>Ô>Ð>rT   ÚPeriodIndex)rË   Ú
other_namerò   c                óÔ  — t          j        |¦  «        }t          |t          ¦  «        r$t	          |d¦  «        rt          |¦  «        j        }t          j        |¦  «        }| j	        j
        }|j        }| j        }|dk    }|r|| j        j        z   dz
  }n|}t          ||||¦  «        }| j        rt"          || j        <   t          |¦  «        }	 t'          | ¦  «        ||	¬¦  «        S )a²  
        Convert the {klass} to the specified frequency `freq`.

        Equivalent to applying :meth:`pandas.Period.asfreq` with the given arguments
        to each :class:`~pandas.Period` in this {klass}.

        Parameters
        ----------
        freq : str
            A frequency.
        how : str {{'E', 'S'}}, default 'E'
            Whether the elements should be aligned to the end
            or start within pa period.

            * 'E', 'END', or 'FINISH' for end,
            * 'S', 'START', or 'BEGIN' for start.

            January 31st ('END') vs. January 1st ('START') for example.

        Returns
        -------
        {klass}
            The transformed {klass} with the new frequency.

        See Also
        --------
        {other}.asfreq: Convert each Period in a {other_name} to the given frequency.
        Period.asfreq : Convert a :class:`~pandas.Period` object to the given frequency.

        Examples
        --------
        >>> pidx = pd.period_range("2010-01-01", "2015-01-01", freq="Y")
        >>> pidx
        PeriodIndex(['2010', '2011', '2012', '2013', '2014', '2015'],
        dtype='period[Y-DEC]')

        >>> pidx.asfreq("M")
        PeriodIndex(['2010-12', '2011-12', '2012-12', '2013-12', '2014-12',
        '2015-12'], dtype='period[M]')

        >>> pidx.asfreq("M", how="S")
        PeriodIndex(['2010-01', '2011-01', '2012-01', '2013-01', '2014-01',
        '2015-01'], dtype='period[M]')
        rý   rò   rô   rŠ   )r¡   rû   r\   r   Úhasattrr,   r­   r#   r´   rƒ   rM   rý   rN   rL   r  r%   Ú_hasnar   rÝ   rŽ   )
rO   rj   rî   Úbase1Úbase2rN   r·   rÆ   r	  rL   s
             rR   r�   zPeriodArray.asfreqj  sî   € õ\ Ô*¨3Ñ/Ô/ˆÝ�d�JÑ'Ô'ð 	.­G°DÐ:NÑ,OÔ,Oð 	.Ý˜tÑ$Ô$Ô-ˆDÝÔ)¨$Ñ/Ô/ˆà”Ô'ˆØÔ'ˆàŒyˆà�SŠjˆØð 	Ø˜TœZœ]Ñ*¨QÑ.ˆGˆGàˆGå$ W¨e°U¸CÑ@Ô@ˆàŒ;ð 	)Ý$(ˆH�T”[Ñ!å˜DÑ!Ô!ˆØ�t�D‰zŒz˜(¨%Ð0Ñ0Ô0Ð0rT   ÚboxedúCallable[[object], str]c                ó"   — |rt           S dj        S )Nz'{}')rF   Úformat)rO   r  s     rR   Ú
_formatterzPeriodArray._formatter³  s   € Øð 	ÝˆJØŒ}ÐrT   r   )Úna_repÚdate_formatr  ústr | floatúnpt.NDArray[np.object_]c               óN   — t          j        | j        | j        j        ||¦  «        S )z3
        actually format my specific types
        )r¡   Úperiod_array_strftimerN   rL   rM   )rO   r  r  Úkwargss       rR   Ú_format_native_typesz PeriodArray._format_native_types¸  s)   € õ Ô.ØŒI�t”zÔ-¨v°{ñ
ô 
ð 	
rT   Tc                ó  •— t          |¦  «        }|| j        k    r|s| S |                      ¦   «         S t          |t          ¦  «        r|                      |j        ¦  «        S t          j        |d¦  «        st          |t          ¦  «        r_t          |dd ¦  «        }t          j        |¦  «        }|                      ¦   «                              |¦  «                             |¦  «        S t!          ¦   «                              ||¬¦  «        S )NÚMr¯   r¨   )r*   rƒ   r…   r\   r,   r�   rj   r   Úis_np_dtyper+   Úgetattrr²   Údtype_to_unitr€   Útz_localizeÚas_unitÚsuperÚastype)rO   rL   r…   r¯   rö   Ú	__class__s        €rR   r,  zPeriodArray.astypeÄ  sò   ø€ õ ˜UÑ#Ô#ˆØ�D”KÒÐØð #Ø�à—y’y‘{”{Ð"Ý�e�[Ñ)Ô)ð 	+Ø—;’;˜uœzÑ*Ô*Ð*åŒ?˜5 #Ñ&Ô&ð 	E­*°U½OÑ*LÔ*Lð 	Eå˜  dÑ+Ô+ˆBÝÔ$ UÑ+Ô+ˆDð ×$Ò$Ñ&Ô&×2Ò2°2Ñ6Ô6×>Ò>¸tÑDÔDÐDå‰wŒw�~Š~˜e¨$ˆ~Ñ/Ô/Ð/rT   Úleftú$NumpyValueArrayLike | ExtensionArrayÚsideúLiteral['left', 'right']ÚsorterúNumpySorter | Noneúnpt.NDArray[np.intp] | np.intpc                ó¶   — |                       |¦  «                             d¦  «        }| j                             d¦  «        }|                     |||¬¦  «        S )NúM8[ns])r0  r2  )Ú_validate_setitem_valuerÚ   r‘   Úsearchsorted)rO   rÀ   r0  r2  ÚnpvalueÚm8arrs         rR   r8  zPeriodArray.searchsortedÚ  sW   € ð ×.Ò.¨uÑ5Ô5×:Ò:¸8ÑDÔDˆð ”×"Ò" 8Ñ,Ô,ˆØ×!Ò! '°¸VÐ!ÑDÔDÐDrT   )ÚlimitÚ
limit_arear…   Úmethodr8   r;  ú
int | Noner<  ú#Literal['inside', 'outside'] | Nonec               ó¶   — |                       d¦  «        }|                     ||||¬¦  «        }|r(t          d|                      | j        ¦  «        ¦  «        S | S )Nr6  )r=  r;  r<  r…   r   )rÚ   Ú_pad_or_backfillr
   rL   )rO   r=  r;  r<  r…   r
  rQ   s          rR   rA  zPeriodArray._pad_or_backfillç  se   € ð �iŠi˜Ñ!Ô!ˆØ×%Ò%Ø °:ÀDð &ñ 
ô 
ˆð ð 	Ý˜ §¢¨D¬JÑ 7Ô 7Ñ8Ô8Ð8àˆKrT   únp.ndarray | intÚopúCallable[[Any, Any], Any]c                óì   — |t           j        t           j        fv sJ ‚|t           j        u r| }t          | j        t          j        |d¬¦  «        ¦  «        } t          | ¦  «        || j        ¬¦  «        S )zì
        Add or subtract array of integers.

        Parameters
        ----------
        other : np.ndarray[int64] or int
        op : {operator.add, operator.sub}

        Returns
        -------
        result : PeriodArray
        r™   rŠ   )	ÚoperatorÚaddÚsubr   rN   r’   r“   rŽ   rL   )rO   rË   rC  Ú
res_valuess       rR   Ú_addsub_int_array_or_scalarz'PeriodArray._addsub_int_array_or_scalarý  so   € ð •h”l¥H¤LÐ1Ð1Ð1Ð1Ð1Ø•”ÐÐØ�FˆEÝ% d¤iµ´¸EÈÐ1NÑ1NÔ1NÑOÔOˆ
Ø�t�D‰zŒz˜*¨D¬JÐ7Ñ7Ô7Ð7rT   c                ó  — t          |t          ¦  «        rJ ‚t          |t          ¦  «        r| t          j        |j        d¦  «        z   S |                      |d¬¦  «         |                      |j        t          j	        ¦  «        S )Nrõ   T)rP   )
r\   r   r   r’   Útimedelta64r  rÎ   rJ  rF  rG  rÏ   s     rR   Ú_add_offsetzPeriodArray._add_offset  sv   € Ý˜e¥TÑ*Ô*Ð*Ð*Ð*å�e�SÑ!Ô!ð 	7Ø�"œ.¨¬°#Ñ6Ô6Ñ6Ð6à×#Ò# E°Ð#Ñ5Ô5Ð5Ø×/Ò/°´½¼ÑFÔFÐFrT   c                óÀ  •— t          | j        t          t          f¦  «        st	          | |¦  «        ‚t          |¦  «        r!t          ¦   «                              |¦  «        S t          |t          ¦  «        r-t          j	        t          |j        ¬¦  «        j        ¦  «        }n&t          j	        t          |¦  «        j        ¦  «        }|                      |¦  «        S )z”
        Parameters
        ----------
        other : timedelta, Tick, np.timedelta64

        Returns
        -------
        PeriodArray
        rø   )r\   rj   r   r   r�   r1   r+  Ú_add_timedeltalike_scalarr’   r“   r   r  Úasm8Ú_add_timedelta_arraylike)rO   rË   Útdr-  s      €rR   rO  z%PeriodArray._add_timedeltalike_scalar  s´   ø€ õ ˜$œ)¥d­C [Ñ1Ô1ð 	5å'¨¨eÑ4Ô4Ð4å�‰;Œ;ð 	<å‘7”7×4Ò4°UÑ;Ô;Ð;å�e�SÑ!Ô!ð 	3Ý”�I¨5¬7Ð3Ñ3Ô3Ô8Ñ9Ô9ˆBˆBå”�I eÑ,Ô,Ô1Ñ2Ô2ˆBØ×,Ò,¨RÑ0Ô0Ð0rT   ú,TimedeltaArray | npt.NDArray[np.timedelta64]c                óê  — | j                              ¦   «         st          d| j         › �¦  «        ‚t          j         d| j         j        › d�¦  «        }	 t          t          j        |¦  «        |dd¬¦  «        }n"# t          $ r}t          d¦  «        |‚d}~ww xY wt          | j
        t          j        |                     d¦  «        ¦  «        ¦  «        } t          | ¦  «        || j         ¬	¦  «        S )
z›
        Parameters
        ----------
        other : TimedeltaArray or ndarray[timedelta64]

        Returns
        -------
        PeriodArray
        z2Cannot add or subtract timedelta64[ns] dtype from úm8[ú]F©rL   r…   Úround_okznCannot add/subtract timedelta-like from PeriodArray that is not an integer multiple of the PeriodArray's freq.Nr™   rŠ   )rL   Ú_is_tick_liker�   r’   Ú
_td64_unitr   r“   rŒ   r"   r   rN   rÚ   rŽ   )rO   rË   rL   ÚdeltaÚerrrI  s         rR   rQ  z$PeriodArray._add_timedelta_arraylike4  s  € ð Œz×'Ò'Ñ)Ô)ð 	åØQÀTÄZÐQÐQñô ð õ ”Ð7˜tœzÔ4Ð7Ð7Ð7Ñ8Ô8ˆð
	Ý'Ý”
˜5Ñ!Ô!¨°UÀUðñ ô ˆEˆEøõ ð 	ð 	ð 	õ (ðEñô ð ðøøøøð	øøøõ & d¤iµ´¸E¿JºJÀtÑ<LÔ<LÑ1MÔ1MÑNÔNˆ
Ø�t�D‰zŒz˜*¨D¬JÐ7Ñ7Ô7Ð7s   Á%A: Á:
BÂBÂBc                ó  — | j                              ¦   «         sJ ‚t          j         d| j         j        › d�¦  «        }t	          |t
          t          j        t          f¦  «        r't          j        t          |¦  «        j
        ¦  «        }nt          j        |¦  «        }	 t          ||dd¬¦  «        }n## t          $ r}t          | |¦  «        |‚d}~ww xY w|                     d¦  «        }t          j        |¦  «        S )a<  
        Arithmetic operations with timedelta-like scalars or array `other`
        are only valid if `other` is an integer multiple of `self.freq`.
        If the operation is valid, find that integer multiple.  Otherwise,
        raise because the operation is invalid.

        Parameters
        ----------
        other : timedelta, np.timedelta64, Tick,
                ndarray[timedelta64], TimedeltaArray, TimedeltaIndex

        Returns
        -------
        multiple : int or ndarray[int64]

        Raises
        ------
        IncompatibleFrequency
        rU  rV  FrW  Nr™   )rL   rY  r’   rZ  r\   r   rL  r   r“   r   rP  r   rŒ   r�   rÚ   r   Úitem_from_zerodim)rO   rË   rL   rR  r[  r\  s         rR   Ú _check_timedeltalike_freq_compatz,PeriodArray._check_timedeltalike_freq_compatY  sö   € ð( Œz×'Ò'Ñ)Ô)Ð)Ð)Ð)å”Ð7˜tœzÔ4Ð7Ð7Ð7Ñ8Ô8ˆå�e�i­¬½Ð>Ñ?Ô?ð 	#Ý”�I eÑ,Ô,Ô1Ñ2Ô2ˆBˆBå”˜EÑ"Ô"ˆBð	>Ý'¨°%¸eÈeÐTÑTÔTˆEˆEøÝð 	>ð 	>ð 	>Ý'¨¨eÑ4Ô4¸#Ð=øøøøð	>øøøð —
’
˜4Ñ Ô ˆÝÔ$ UÑ+Ô+Ð+s   Â!B5 Â5
CÂ?CÃC©ÚskipnaÚkeepdimsrE   ra  rb  c               ó²   •—  t          ¦   «         j        |f||dœ|¤Ž}|r6t          |t          j        ¦  «        r|                      || j        ¬¦  «        S |S )Nr`  rŠ   )r+  Ú_reducer\   r’   rš   r§   rL   )rO   rE   ra  rb  r"  rQ   r-  s         €rR   rd  zPeriodArray._reduce�  sf   ø€ ð !•‘”” ÐR¨f¸xÐRÐRÈ6ÐRÐRˆØð 	A�
 6­2¬:Ñ6Ô6ð 	AØ×&Ò& v°T´ZÐ&Ñ@Ô@Ð@ØˆrT   )r`   ra   ©NF)rL   r„   r…   r†   r`   r‡   )r–   r—   rL   r,   r`   r   )rL   r„   r…   r†   r`   r   )rL   r=   r…   r†   r`   r   rK   )r`   r   )rº   r»   r`   r   )rÀ   rÁ   r`   rÂ   )rÀ   rF   r`   r#   )rË   rÌ   r`   r‡   )r`   r,   )r`   r   )r`   rF   )NN)rL   rÕ   r…   rÖ   r`   r×   )r`   rì   )Nr¶   )rî   rF   r`   r>   )r`   rÁ   r½   )Nrò   )rî   rF   r`   r   )F)r  r†   r`   r  )r  r  r`   r  )T)r…   r†   )r.  N)rÀ   r/  r0  r1  r2  r3  r`   r4  )
r=  r8   r;  r>  r<  r?  r…   r†   r`   r   )rË   rB  rC  rD  r`   r   )rË   r   )rË   rS  r`   r   )rE   rF   ra  r†   rb  r†   )LrU   Ú
__module__Ú__qualname__rV   Ú__array_priority__Ú_typr’   r‰   r   Ú_internal_fill_valuer#   Ú_recognized_scalarsr_   Ú__annotations__Ú_infer_matchesrW   rd   re   rg   rk   r}   r~   r‚   r•   Úclassmethodr�   r§   r«   r°   r¹   r¿   rÈ   rÊ   rÅ   r&   rL   rj   rÔ   rß   rë   rX   rl   rm   rn   ro   rp   rq   rr   rt   rv   ru   rs   rw   rx   ry   rz   r{   r|   rf   r€   r  r'   Ú_shared_doc_kwargsr�   r  r#  r,  r8  rA  rJ  rM  rO  rQ  r_  rd  Ú__classcell__)r-  s   @rR   rD   rD   |   sZ  ø€ € € € € € ð4ð 4ðn ÐØ€DØ#˜2œ8 D™>œ>ÐØ!˜)Ðð8ð 8Ðð ð ð ñ ð !€Nàðð ð ñ „Xðð €JÐÐÐÑØ*Ð+€IÐ+Ð+Ð+Ñ+Ø?Ð?Ð?€KÐ?Ð?Ð?Ñ?ðð ð €Jð ð ð ñ ð& $.°Ñ#;¸iÑ#GÐÐGÐGÐGÑGØ'MÐ'MÐ'MÐÐMÐMÐMÑMàÐÐÑð
4ð 4ð 4ð 4ð 4ð: ð(ð (ð (ñ „[ð(ð ð
 #Øð*ð *ð *ð *ð *ñ „[ð*ð6 à=BðCð Cð Cð Cð Cñ „[ðCð
 ð&ð &ð &ð &ñ „[ð&ð( ðð ñ „[ðð ð4ð 4ð 4ñ „[ð4ðTð Tð Tð Tð-ð -ð -ð -ð0ð 0ð 0ð 0ð ðð ð ñ „^ðð ðð ð ñ „Xðð ð/ð /ð /ñ „Xð/ð AEð2ð 2ð 2ð 2ð 2ð4Oð Oð Oð Oð< ˆ?Øð	ñô €Dð* ˆOØð	ñô €Eð" ˆ/Øð	ñô €Cð, ˆ?Øð	ñô €Dð$ ˆ_Øð	ñô €Fð& ˆ_Øð	ñô €Fð& !�Øð	ñô €Jð( €DØ!�/Øð	ñô €Kð. €IØ€GØ-˜oØð	ñô ð €I�ð: ˆoØð	ñô €Gð" ˆOØð'	ñ*ô *€EðX $�OØð 	ñ#ô #€MðH  €Kàð5ð 5ð 5ñ „Xð5ð$mð mð mð mð mðb?ð ?ð ?ð ?ð 	€SÐMÐMÐÐM ]¸}ÐMÐMÐMÐMðC1ð C1ð C1ð C1ñ NÔMðC1ðPð ð ð ð ð (-¸$ð
ð 
ð 
ð 
ð 
ð 
ð0ð 0ð 0ð 0ð 0ð 0ð 0ð2 *0Ø%)ð	Eð Eð Eð Eð Eð" !Ø:>Øðð ð ð ð ð ð,8ð 8ð 8ð 8ð*Gð Gð Gð Gð1ð 1ð 1ð 1ð 1ð0#8ð #8ð #8ð #8ðJ#,ð #,ð #,ðR ,0À%ðð ð ð ð ð ð ð ð ð ð ð rT   r`   r"   c                óh  — t          |t          j        t          f¦  «        s|€d}n¼t          |t          ¦  «        r\t          j        ¦   «         5  t          j        ddt          ¬¦  «         t          |¦  «        j
        }ddd¦  «         n# 1 swxY w Y   nKt          |t          t          t          f¦  «        r|j        }n!t          t!          |¦  «        ¦  «        j        }t          | j        ¦  «        j
        }t%          j        t)          | ¦  «        j        ||¬¦  «        }t-          |¦  «        S )a>  
    Helper function to render a consistent error message when raising
    IncompatibleFrequency.

    Parameters
    ----------
    left : PeriodArray
    right : None, DateOffset, Period, ndarray, or timedelta-like

    Returns
    -------
    IncompatibleFrequency
        Exception to be raised by the caller.
    NÚignorezPeriodDtype\[B\] is deprecated)Úcategory)r›   Úown_freqÚ
other_freq)r\   r’   rš   r0   r   ÚwarningsÚcatch_warningsÚfilterwarningsÚFutureWarningr,   r­   r.   rD   r#   rÔ   r    r   rj   r!   r  rŽ   rU   r"   )r.  Úrightru  rt  Úmsgs        rR   r�   r�   Š  sY  € õ  �%�"œ*Õ&7Ð8Ñ9Ô9ð =¸U¸]Øˆ
ˆ
Ý	�E�:Ñ	&Ô	&ð 	=ÝÔ$Ñ&Ô&ð 	5ð 	5ÝÔ#ØÐ;Åmðñ ô ð õ % UÑ+Ô+Ô4ˆJð		5ð 	5ð 	5ñ 	5ô 	5ð 	5ð 	5ð 	5ð 	5ð 	5ð 	5øøøð 	5ð 	5ð 	5ð 	5øõ
 
�E�N­K½Ð@Ñ	AÔ	Að =Ø”]ˆ
ˆ
å"¥9¨UÑ#3Ô#3Ñ4Ô4Ô<ˆ
å˜4œ9Ñ%Ô%Ô.€HÝ
Ô
Ý�‰JŒJÔ¨(¸zðñ ô €Cõ ! Ñ%Ô%Ð%s   Á1BÂBÂBFr®   ú,Sequence[Period | str | None] | AnyArrayLikerj   ústr | Tick | BaseOffset | Noner…   r†   c                óŽ  — t          | dd¦  «        }t          j        |d¦  «        rt                               | |¦  «        S t          |t          ¦  «        r5t          | ¦  «        }|�"||j        k    r|S |                     |¦  «        S |S t          | t          j
        t          t          t          f¦  «        st          | ¦  «        } t          j        | ¦  «        }|rt          |¦  «        }nd}|j        j        dk    r"t#          |¦  «        dk    rt%          d¦  «        ‚|j        j        dv rG|                     t          j        d¬	¦  «        }t+          j        ||¦  «        }t          ||¬
¦  «        S t/          |¦  «        } |€t+          j        | ¦  «        }t          |¦  «        }t                               | |¬
¦  «        S )a˜  
    Construct a new PeriodArray from a sequence of Period scalars.

    Parameters
    ----------
    data : Sequence of Period objects
        A sequence of Period objects. These are required to all have
        the same ``freq.`` Missing values can be indicated by ``None``
        or ``pandas.NaT``.
    freq : str, Tick, or Offset
        The frequency of every element of the array. This can be specified
        to avoid inferring the `freq` from `data`.
    copy : bool, default False
        Whether to ensure a copy of the data is made.

    Returns
    -------
    PeriodArray

    See Also
    --------
    PeriodArray
    pandas.PeriodIndex

    Examples
    --------
    >>> period_array([pd.Period("2017", freq="Y"), pd.Period("2018", freq="Y")])
    <PeriodArray>
    ['2017', '2018']
    Length: 2, dtype: period[Y-DEC]

    >>> period_array([pd.Period("2017", freq="Y"), pd.Period("2018", freq="Y"), pd.NaT])
    <PeriodArray>
    ['2017', '2018', 'NaT']
    Length: 3, dtype: period[Y-DEC]

    Integers that look like years are handled

    >>> period_array([2000, 2001, 2002], freq="D")
    <PeriodArray>
    ['2000-01-01', '2001-01-01', '2002-01-01']
    Length: 3, dtype: period[D]

    Datetime-like strings may also be passed

    >>> period_array(["2000-Q1", "2000-Q2", "2000-Q3", "2000-Q4"], freq="Q")
    <PeriodArray>
    ['2000Q1', '2000Q2', '2000Q3', '2000Q4']
    Length: 4, dtype: period[Q-DEC]
    rL   Nr%  rS   r   z9PeriodIndex does not allow floating point in constructionÚiuFr¨   rŠ   )r'  r   r&  rD   r°   r\   r,   rj   r�   r’   rš   rÞ   Útupler/   r“   rL   Úkindr  r�   r,  r‰   r¡   Úfrom_ordinalsr)   r¢   r§   )	r®   rj   r…   Ú
data_dtypeÚoutÚarrdatarL   Úarrr¦   s	            rR   Úperiod_arrayr‡  ²  sª  € õn ˜˜w¨Ñ-Ô-€Jå
„�z 3Ñ'Ô'ð 8Ý×+Ò+¨D°$Ñ7Ô7Ð7Ý�*�kÑ*Ô*ð Ý˜$ÑÔˆØÐØ�z”Ò&Ð&Ø�
Ø—:’:˜dÑ#Ô#Ð#Øˆ
õ �d�RœZ­­uµiÐ@ÑAÔAð Ý�D‰zŒzˆåŒj˜ÑÔ€Gð ð Ý˜DÑ!Ô!ˆˆàˆà„}Ô˜SÒ Ð ¥S¨¡\¤\°AÒ%5Ð%5ÝÐSÑTÔTÐTà„}Ô˜TÐ!Ð!Ø�nŠn�RœX¨EˆnÑ2Ô2ˆõ Ô*¨3°Ñ5Ô5ˆÝ˜8¨5Ð1Ñ1Ô1Ð1å˜Ñ!Ô!€DØ€|ÝÔ% dÑ+Ô+ˆÝ˜ÑÔ€EÝ×%Ò% d°%Ð%Ñ8Ô8Ð8rT   c                ó   — d S rK   r½   rÒ   s     rR   rŸ   rŸ     s   € ØBEÀ#rT   útimedelta | str | Noner   c                ó   — d S rK   r½   rÒ   s     rR   rŸ   rŸ     s   € ØLOÈCrT   ú1BaseOffsetT | BaseOffset | timedelta | str | Nonec                óÞ   — |�t          |d¬¦  «        }| �Wt          | ¦  «        } t          | t          ¦  «        st	          d¦  «        ‚|€| j        }n|| j        k    rt          d¦  «        ‚|S )at  
    If both a dtype and a freq are available, ensure they match.  If only
    dtype is available, extract the implied freq.

    Parameters
    ----------
    dtype : dtype
    freq : DateOffset or None

    Returns
    -------
    freq : DateOffset

    Raises
    ------
    ValueError : non-period dtype
    IncompatibleFrequency : mismatch between dtype and freq
    NT©Ú	is_periodzdtype must be PeriodDtypez&specified freq and dtype are different)r   r*   r\   r,   rŒ   rj   r"   rÒ   s     rR   rŸ   rŸ     s�   € ð* ÐÝ˜¨Ð.Ñ.Ô.ˆàÐÝ˜UÑ#Ô#ˆÝ˜%¥Ñ-Ô-ð 	:ÝÐ8Ñ9Ô9Ð9Øˆ<Ø”:ˆDˆDØ�U”ZÒÐÝ'Ð(PÑQÔQÐQð €KrT   ú(tuple[npt.NDArray[np.int64], BaseOffset]c                ó   — t          | j        t          j        ¦  «        r| j        j        dk    rt	          d| j        › �¦  «        ‚|€Mt          | t
          ¦  «        r| j        | j        }} nLt          | t          ¦  «        r| j        | j	        j        }} n#t          | t
          t          f¦  «        r| j        } t          | j        ¦  «        }t          j        |¦  «        }|j        }t          |                      d¦  «        |||¬¦  «        |fS )aí  
    Convert a datetime-like array to values Period ordinals.

    Parameters
    ----------
    data : Union[Series[datetime64[ns]], DatetimeIndex, ndarray[datetime64ns]]
    freq : Optional[Union[str, Tick]]
        Must match the `freq` on the `data` if `data` is a DatetimeIndex
        or Series.
    tz : Optional[tzinfo]

    Returns
    -------
    ordinals : ndarray[int64]
    freq : Tick
        The frequency extracted from the Series or DatetimeIndex if that's
        used.

    r%  zWrong dtype: Nr™   )Úreso)r\   rL   r’   r�  rŒ   r-   r�   rj   r/   Údtr   r#   r´   rý   Úc_dt64arr_to_periodarrrÚ   )r®   rj   r¯   r‘  rP   s        rR   r   r   ?  sô   € õ, �d”j¥"¤(Ñ+Ô+ð 7¨t¬z¬À#Ò/EÐ/EÝÐ5¨¬Ð5Ð5Ñ6Ô6Ð6à€|Ý�d�HÑ%Ô%ð 	4Øœ t¤y�$ˆDˆDÝ˜�iÑ(Ô(ð 	4Øœ t¤w¤|�$ˆDøå	�D�8¥YÐ/Ñ	0Ô	0ð ØŒ|ˆå˜tœzÑ*Ô*€DÝÔ% dÑ+Ô+€DØÔ"€DÝ! $§)¢)¨D¡/¤/°4¸À$ÐGÑGÔGÈÐMÐMrT   rô   ÚmultÚintc                óH  — t          j        | ||¦  «        dk    rt          d¦  «        ‚|�t          |d¬¦  «        }|j        }| �t          | |¦  «        } |�t          ||¦  «        }t          | t
          ¦  «        }t          |t
          ¦  «        }|r!|r| j        |j        k    rt          d¦  «        ‚| t          u s	|t          u rt          d¦  «        ‚|€*|r| j        }n|r|j        }nt          d¦  «        ‚|j        }|�m||z  }| €6t          j
        |j        |z
  |z   |j        dz   |t          j        ¬	¦  «        }n_t          j
        | j        | j        |z   |t          j        ¬	¦  «        }n/t          j
        | j        |j        dz   |t          j        ¬	¦  «        }||fS )
Né   zOOf the three parameters: start, end, and periods, exactly two must be specifiedTr�  z!start and end must have same freqzstart and end must not be NaTz#Could not infer freq from start/endrô   rŠ   )ÚcomÚcount_not_nonerŒ   r   r  r#   r\   rj   r   r’   ÚarangerÆ   r‰   )r¶   r·   r¥   rj   r”  Úis_start_perÚ
is_end_perr®   s           rR   rµ   rµ   g  sË  € Ý
Ô˜%  gÑ.Ô.°!Ò3Ð3Ýð,ñ
ô 
ð 	
ð
 ÐÝ˜¨Ð.Ñ.Ô.ˆØŒvˆàÐÝ�u˜dÑ#Ô#ˆØ
€Ý�S˜$ÑÔˆå˜e¥VÑ,Ô,€LÝ˜C¥Ñ(Ô(€Jàð >˜
ð > u¤z°S´XÒ'=Ð'=ÝÐ<Ñ=Ô=Ð=Ø•€|€|�s�c�z�zÝÐ8Ñ9Ô9Ð9à€|Øð 	DØ”:ˆDˆDØð 	DØ”8ˆDˆDåÐBÑCÔCÐCØŒvˆàÐØ˜D‘.ˆØˆ=Ý”9Ø”˜gÑ%¨Ñ,¨c¬k¸A©o¸tÍ2Ì8ðñ ô ˆDˆDõ ”9Ø”˜uœ}¨wÑ6¸ÅBÄHðñ ô ˆDˆDõ Œy˜œ¨¬°a©¸ÅRÄXÐNÑNÔNˆà�ˆ:ÐrT   útuple[np.ndarray, BaseOffset]c                óŽ  — |€d}|€d}|€d}|€d}g }|��|€6t          dd¬¦  «        }t          t          t          j        j        ¦  «        }	n\t          |d¬¦  «        }t          j        |¦  «        }	|	t          t          t          j        j        ¦  «        k    rt          d¦  «        ‚|j	        }
t          | |¦  «        \  } }t          | |d¬¦  «        D ]O\  }}t          j        |||
¦  «        \  }}t          j        ||dddddd|	¦	  «	        }|                     |¦  «         ŒPn~t          |d¬¦  «        }t          j        |¦  «        }	t          | |||||¦  «        }t          |ddiŽD ]8\  }}}}}}|                     t          j        ||||||dd|	¦	  «	        ¦  «         Œ9t!          j        |t           j        ¬	¦  «        |fS )
Nr   rô   ÚQTr�  zbase must equal FR_QTR)Ústrictr   rŠ   )r   r
   r•  r   ÚFR_QTRrÀ   r¡   Úfreq_to_dtype_codeÚAssertionErrorrÔ   Ú_make_field_arraysÚzipr   Úquarter_to_myearÚperiod_ordinalÚappendr’   r”   r‰   )rl   rm   ry   rn   ro   rp   rq   rj   r¦   rP   rÔ   ÚyÚqÚcalendar_yearÚcalendar_monthÚvalÚarraysÚmthÚdÚhÚmnÚss                         rR   r¾   r¾   ˜  sú  € ð €|ØˆØ€~ØˆØ€~ØˆØ
€{Øˆà€HàÑØˆ<Ý˜S¨DÐ1Ñ1Ô1ˆDÝ��YÔ-Ô3Ñ4Ô4ˆDˆDå˜T¨TÐ2Ñ2Ô2ˆDÝÔ/°Ñ5Ô5ˆDØ•t�C¥Ô!1Ô!7Ñ8Ô8Ò8Ð8Ý$Ð%=Ñ>Ô>Ð>à”,ˆÝ*¨4°Ñ9Ô9‰ˆˆgÝ˜˜g¨dÐ3Ñ3Ô3ð 	!ð 	!‰DˆAˆqÝ,3Ô,DÀQÈÈ7Ñ,SÔ,SÑ)ˆM˜>ÝÔ*Ø˜~¨q°!°Q¸¸1¸aÀñô ˆCð �OŠO˜CÑ Ô Ð Ð ð	!õ ˜¨Ð.Ñ.Ô.ˆÝÔ+¨DÑ1Ô1ˆÝ# D¨%°°d¸FÀFÑKÔKˆÝ#&¨Ð#<°tÐ#<Ð#<ð 	Wð 	WÑˆAˆs�A�q˜"˜aØ�OŠO�IÔ4°Q¸¸QÀÀ2ÀqÈ!ÈQÐPTÑUÔUÑVÔVÐVÐVåŒ8�H¥B¤HÐ-Ñ-Ô-¨tÐ3Ð3rT   úlist[np.ndarray]c                 óæ   ‡— d Š| D ]^}t          |t          t          j        t          f¦  «        r5‰�"t          |¦  «        ‰k    rt          d¦  «        ‚‰€t          |¦  «        ŠŒ_ˆfd„| D ¦   «         S )NzMismatched Period array lengthsc                ó°   •— g | ]R}t          |t          j        t          t          f¦  «        rt          j        |¦  «        nt          j        |‰¦  «        ‘ŒSS r½   )r\   r’   rš   rÞ   r/   r“   Úrepeat)Ú.0r]   Úlengths     €rR   ú
<listcomp>z&_make_field_arrays.<locals>.<listcomp>Õ  s^   ø€ ð ð ð ð õ ˜!�bœj­$µ	Ð:Ñ;Ô;ð&�BŒJ�q‰MŒMˆMå”˜1˜fÑ%Ô%ð	ð ð rT   )r\   rÞ   r’   rš   r/   r  rŒ   )rº   r]   r¹  s     @rR   r¤  r¤  É  s•   ø€ Ø€FØð  ð  ˆÝ�a�$¥¤
­IÐ6Ñ7Ô7ð 	 ØÐ!¥c¨!¡f¤f°Ò&6Ð&6Ý Ð!BÑCÔCÐCØˆ~Ý˜Q™œ�øð
ð ð ð ð ðñ ô ð rT   rK   )rE   rF   rG   rH   )r`   r"   re  )r®   r|  rj   r}  r…   r†   r`   rD   )rj   rA   r`   rA   )rj   r‰  r`   r   )rj   r‹  r`   rA   )r`   r�  )rô   )r”  r•  )NNNNNNNN)r`   r�  )r`   r´  )iÚ
__future__r   Údatetimer   rF  Útypingr   r   r   r   r	   r
   r   rv  Únumpyr’   Úpandas._libsr   rÿ   r   Úpandas._libs.arraysr   Úpandas._libs.tslibsr   r   r   r   r   r   r   r   r“  r   r   r   r   r¡   r   Úpandas._libs.tslibs.dtypesr   r   Úpandas._libs.tslibs.fieldsr   Úpandas._libs.tslibs.offsetsr   r    Úpandas._libs.tslibs.periodr!   r"   r#   r$   r%   Úpandas.util._decoratorsr&   r'   r(   Úpandas.core.dtypes.commonr)   r*   Úpandas.core.dtypes.dtypesr+   r,   Úpandas.core.dtypes.genericr-   r.   r/   r0   Úpandas.core.dtypes.missingr1   rú   r2   r²   Úpandas.core.commonÚcoreÚcommonr˜  Úcollections.abcr3   r4   Úpandas._typingr5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   Úpandas.core.arrays.baser@   rA   ro  rX   ÚDatelikeOpsÚPeriodMixinrD   r�   r‡  rŸ   rµ   r¾   r¤  r½   rT   rR   ú<module>rÓ     s¢  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø €€€ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð €€€à Ð Ð Ð ðð ð ð ð ð ð ð ð .Ð -Ð -Ð -Ð -Ð -ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð 6Ð 5Ð 5Ð 5Ð 5Ð 5ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ,Ð +Ð +Ð +Ð +Ð +à 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø  Ð  Ð  Ð  Ð  Ð  Ð  Ð  Ð  àð 7ðð ð ð ð ð ð ð ð
	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 9Ð8Ð8Ð8Ð8Ð8ðð ð ð ð ð ð ð ð 7Ð6Ð6Ð6Ð6Ð6ð ˆg�m¨:Ð6Ñ6Ô6€ð ˆ]ðÐ ð
ð ð ð ð ð €ˆOÑÔðHð Hð Hð Hð H�#”/ 9Ô#8ñ Hô Hñ ÔðHðV !&ð !&ð !&ð !&ðT ,0Øð]9ð ]9ð ]9ð ]9ð ]9ð@ 
Ø EÐ EÐ Eñ 
„Ø Eð 
Ø OÐ OÐ Oñ 
„Ø Oð"ð "ð "ð "ðL ð%Nð %Nð %Nð %Nð %NðP.ð .ð .ð .ð .ðd 
Ø
ØØØ	ØØØ	ð.4ð .4ð .4ð .4ð .4ðbð ð ð ð ð rT   