Ë
    u™ãjWÔ  ã                  óØ  — 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 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$m%Z% d dl&m'Z' d d	l(m)Z)m*Z* d d
l+m,Z,m-Z- d dl.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 d dl5m6Z6 d dl7m8Z8m9Z9 d dl:m;Z; d dl<m=Z=m>Z> d dl?m@Z@mAZA d dlBmCZCmDZDmEZEmFZF d dlGmHZH d dlImJZJmKZL d dlMmNc mOZP d dlQmRZR er*d dlSmTZTmUZU d dlVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^ d dl?m_Z_ d dlIm`Z`maZa  e
de¬«      Zbd'd(d„Zc e9d«       G d„ deLjÈ                  e$jÊ                  «      «       Zfd)d„Zg	 d'	 	 	 	 	 d*d „Zh	 	 	 	 	 	 d+d!„Zi	 d'	 d,d"„Zd-d.d#„Zj	 	 	 	 	 	 	 	 d/	 d0d$„Zkd1d%„Zld2d&„Zmy)3é    )Úannotations)Ú	timedeltaN)ÚTYPE_CHECKINGÚAnyÚLiteralÚSelfÚTypeVarÚcast)ÚalgosÚlib)ÚNDArrayBacked)Ú
BaseOffsetÚDayÚNaTÚNaTTypeÚ
ResolutionÚ	TimedeltaÚadd_overflowsafeÚastype_overflowsafeÚdt64arr_to_periodarrÚget_unit_from_dtypeÚiNaTÚparsingÚperiodÚ	to_offset)ÚMONTH_NUMBERS)Ú	FreqGroupÚPeriodDtypeBase)ÚTickÚdelta_to_tick)ÚDIFFERENT_FREQÚINT_TO_PERIOD_DEPR_MSGÚIncompatibleFrequencyÚPeriodÚget_period_field_arrÚperiod_asfreq_arr)ÚPandas4Warning)Úcache_readonlyÚ
set_module)Úfind_stack_level)Úensure_objectÚpandas_dtype)ÚDatetimeTZDtypeÚPeriodDtype)ÚABCIndexÚABCPeriodIndexÚ	ABCSeriesÚABCTimedeltaArray)Úisna)ÚExtensionArrayÚdatetimelike)Úextract_array)ÚCallableÚSequence)ÚAnyArrayLikeÚDtypeÚDtypeObjÚFillnaOptionsÚNpDtypeÚNumpySorterÚNumpyValueArrayLikeÚnpt)ÚExtensionDtype)ÚDatetimeArrayÚTimedeltaArrayÚBaseOffsetT)Úboundc                ó@   ‡ — ˆ fd„}‰ |_         ||_        t        |«      S )Nc                ób   •— | j                   j                  }t        ‰| j                  |«      }|S ©N)ÚdtypeÚ_dtype_coder%   Úasi8)ÚselfÚbaseÚresultÚnames      €úd/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/core/arrays/period.pyÚfz_field_accessor.<locals>.fr   s)   ø€ Ø�z‰z×%Ñ%ˆÜ% d¨D¯I©I°tÓ<ˆØˆó    )Ú__name__Ú__doc__Úproperty)rO   Ú	docstringrQ   s   `  rP   Ú_field_accessorrW   q   s"   ø€ ôð
 €A„JØ€A„IÜ�A‹;ÐrR   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<   edZd„«       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`dad„«       Zed„ «       Zedbd„«       Z	 	 	 	 dcd „Zddd!„Z	 	 	 	 ded"„Z e!dfd#„«       Z"edgd$„«       Z#edhd%„«       Z$edid&„«       Z%	 dj	 	 	 	 	 dkd'„Z&d`d(„Z' e(d)d*«      Z) e(d+d,«      Z* e(d-d.«      Z+ e(d/d0«      Z, e(d1d2«      Z- e(d3d4«      Z. e(d5d6«      Z/e/Z0 e(d7d8«      Z1ed9„ «       Z2ed:„ «       Z3 e(d;d<«      Z4ed=„ «       Z5 e(d>d?«      Z6 e(d@dA«      Z7 e(dBdC«      Z8edD„ «       Z9edldE„«       Z:dmdndF„Z;	 	 	 	 	 	 dodG„Z<dpdH„Z=dqdrdI„Z>dsdtdJ„Z?dKddLœ	 	 	 dudM„Z@dvdwˆ fdO„ZA	 	 dx	 	 	 	 	 	 	 dydP„ZBdddNdQœ	 	 	 	 	 	 	 	 	 dzdR„ZC	 	 	 	 	 	 d{dS„ZDd|dT„ZEˆ fdU„ZF	 	 	 	 d}dV„ZGdW„ ZHdNddXœ	 	 	 	 	 d~ˆ fdY„ZIˆ xZJS )ÚPeriodArraya^  
    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 rH   )Ú
isinstancer.   )Úxs    rP   ú<lambda>zPeriodArray.<lambda>¹   s   € ÄØ	Œ;óB€ rR   zCallable[[DtypeObj], bool]Ú_is_recognized_dtypec                ó   — t         S rH   )r$   ©rL   s    rP   Ú_scalar_typezPeriodArray._scalar_type½   s   € äˆrR   z	list[str]Ú
_other_opsÚis_leap_yearÚ	_bool_ops)Ú
start_timeÚend_timeÚfreqÚ_object_ops)ÚyearÚmonthÚdayÚhourÚminuteÚsecondÚ
weekofyearÚweekÚday_of_weekÚday_of_yearÚquarterÚqyearÚdays_in_monthÚ
_field_opsÚ_datetimelike_ops)ÚstrftimeÚto_timestampÚasfreqÚ_datetimelike_methodsr.   Ú_dtypeNFc                óx  — |�*t        |«      }t        |t        «      st        d|› d�«      ‚t        |t        «      r,|j
                  }t        |t        | «      «      s't        d«      ‚t        |t        «      r|j
                  }t        |t        | «      «      r?|�%||j                  k7  rt        ||j                  «      ‚|j                  |j                  }}|st        j                  |d¬«      }nt        j                  |d|¬«      }|€t        d«      ‚t!        d|«      }t#        j$                  | ||«       y )	NzInvalid dtype z for PeriodArrayzIncorrect dtypeÚint64©rI   ©rI   Úcopyz-dtype is not specified and cannot be inferredr.   )r,   r\   r.   Ú
ValueErrorr1   Ú_valuesÚtypeÚ	TypeErrorr0   rI   Úraise_on_incompatiblerh   Ú_ndarrayÚnpÚasarrayÚarrayr
   r   Ú__init__)rL   ÚvaluesrI   r‚   s       rP   rŒ   zPeriodArray.__init__Ü   s  € ØÐÜ  Ó'ˆEÜ˜e¤[Ô1Ü  >°%°Ð8HÐ!IÓJÐJä�fœiÔ(Ø—^‘^ˆFÜ˜f¤d¨4£jÔ1ÜÐ 1Ó2Ð2ä˜¤Ô/Ø—^‘^ˆFä�fœd 4›jÔ)ØÐ  U¨f¯l©lÒ%:Ü+¨F°E·J±JÓ?Ð?Ø"ŸO™O¨V¯\©\�EˆFáÜ—Z‘Z ¨gÔ6‰Fä—X‘X˜f¨G¸$Ô?ˆFØˆ=ÜÐLÓMÐMÜ�] EÓ*ˆÜ×Ñ˜t V¨UÕ3rR   c                óz   — d}t        |t        j                  «      r|j                  dk(  sJ |«       ‚ | ||¬«      S )Nz Should be numpy array of type i8Úi8r€   )r\   r‰   ÚndarrayrI   )Úclsr�   rI   Úassertion_msgs       rP   Ú_simple_newzPeriodArray._simple_newù   s:   € ð ;ˆÜ˜&¤"§*¡*Ô-°&·,±,À$Ò2FÐUÈÓUÐFÙ�6 Ô'Ð'rR   r�   c          	     óî  — |�t        |«      }t        |dd «      }t        j                  |d«      r"|�|j                  nd }| j                  ||«      S t        |d¬«      }t        || «      r)|�|j                  ||¬«      S |r|j                  «       S |S t        |t        j                  t        t        t        t        t         f«      st        |«      }t        |t         «      r3|j"                  j$                  dv r|j'                  t(        t*        ¬«      }t        j,                  |«      }|j"                  j$                  dk(  r_|j.                  rS|j1                  «       t        j2                  t        j4                  «      j0                  kD  r|j                  t(        «      }|j"                  j$                  d	k(  rlt7        |«      d
kD  r^t        j8                  |«      st;        d«      ‚t        j<                  |j>                  t@        t        j4                  ¬«      } | ||¬«      S |j"                  j$                  dv ritC        jD                  tF        tH        tK        «       ¬«       |j                  t        j4                  d¬«      }tM        jN                  ||«      } | ||¬«      S tQ        |«      }	|€ tM        jR                  |	«      }
tU        |
«      }tM        jV                  |	|«      } | ||¬«      S )NrI   ÚMT)Úextract_numpy©r‚   Úiu)rI   Úna_valueÚurQ   r   z9PeriodArray does not allow floating point in constructionr€   ©Ú
stacklevelF),r,   Úgetattrr   Úis_np_dtypeÚ_freqÚ_from_datetime64r6   r\   Úastyper‚   r‰   r�   ÚlistÚtupler1   r/   r4   rI   ÚkindÚto_numpyÚobjectr   rŠ   ÚsizeÚmaxÚiinfor   ÚlenÚall_nansr†   ÚfullÚshaper   ÚwarningsÚwarnr"   r'   r*   Ú	libperiodÚfrom_calendar_ordinalsr+   Úextract_period_unitr.   Úextract_ordinals)r‘   ÚscalarsrI   r‚   Ú
data_dtyperh   ÚarrdataÚordinalsÚarrÚperiodsÚ
dtype_bases              rP   Ú_from_sequencezPeriodArray._from_sequence  sX  € ð ÐÜ  Ó'ˆEô ˜W g¨tÓ4ˆ
Ü�?‰?˜: sÔ+Ø"'Ð"3�5—;’;¸ˆDØ×'Ñ'¨°Ó6Ð6ä °tÔ<ˆÜ�g˜sÔ#ØÐ Ø—~‘~ e°$�~Ó7Ð7ÙØ—|‘|“~Ð%ØˆNäØ”b—j‘j¤$¬¬y¼(ÄNÐSô
ô ˜7“mˆGä�gœ~Ô.°7·=±=×3EÑ3EÈÑ3Mð ×&Ñ&¬V¼cÐ&ÓBˆGä—*‘*˜WÓ%ˆà�M‰M×Ñ #Ò%Ø—’Ø—‘“¤§¡¬¯©Ó 2× 6Ñ 6Ò6ð
 —n‘n¤VÓ,ˆGà�=‰=×Ñ Ò$¬¨W«¸Ò)9Ü—<‘< Ô(ÜØOóð ô —w‘w˜wŸ}™}¬d¼"¿(¹(ÔCˆHÙ�x uÔ-Ð-à�]‰]×Ñ 4Ñ'ô
 �M‰MÜ&ÜÜ+Ó-õð
 —.‘.¤§¡°�.Ó6ˆCÜ ×7Ñ7¸¸UÓCˆHÙ�x uÔ-Ð-ä# GÓ,ˆGàˆ}Ü&×:Ñ:¸7ÓC�
Ü# JÓ/�Ü ×1Ñ1°'¸5ÓAˆHÙ�x uÔ-Ð-rR   r—   c               ó*   — | j                  |||¬«      S )Nr�   )r»   )r‘   ÚstringsrI   r‚   s       rP   Ú_from_sequence_of_stringsz%PeriodArray._from_sequence_of_stringsS  s   € ð ×!Ñ! '°¸TÐ!ÓBÐBrR   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‘   Údatarh   ÚtzrI   s        rP   r    zPeriodArray._from_datetime64Y  sG   € ô �dœJÔ'Ü˜tÓ$×-Ñ-ˆDÜ)¨$°°bÓ9‰
ˆˆdÜ˜DÓ!ˆÙ�4˜uÔ%Ð%rR   c                ó¢   — t        j                  |«      }|�t        j                  |«      }|€|�t	        ||||«      \  }}||fS t        d«      ‚)Nz/Not enough parameters to construct Period range)ÚdtlÚvalidate_periodsr$   Ú_maybe_convert_freqÚ_get_ordinal_rangerƒ   )r‘   ÚstartÚendr¹   rh   Úsubarrs         rP   Ú_generate_rangezPeriodArray._generate_rangen  s`   € ä×&Ñ& wÓ/ˆàÐÜ×-Ñ-¨dÓ3ˆDàÐ  Ü-¨e°S¸'À4ÓH‰LˆF�Dð �tˆ|Ðô ÐNÓOÐOrR   c               ó^   — t        dd|i|¤Ž\  }}t        |«      }| j                  ||¬«      S )Nrh   r€   © )Ú_range_from_fieldsr.   r“   )r‘   Úfieldsrh   rÊ   rI   s        rP   Ú_from_fieldszPeriodArray._from_fields|  s5   € ä)Ñ>¨tÐ>°vÑ>‰ˆ�Ü˜DÓ!ˆØ�‰˜v¨UˆÓ3Ð3rR   c                óú   — |t         u rt        j                  |j                  «      S t	        || j
                  «      r0| j                  |«       t        j                  |j                  «      S t        d|› d�«      ‚)Nz!'value' should be a Period. Got 'z
' instead.)	r   r‰   r   Ú_valuer\   rb   Ú_check_compatible_withÚordinalrƒ   ©rL   Úvalues     rP   Ú_unbox_scalarzPeriodArray._unbox_scalar…  sd   € ð ”C‰<Ü—8‘8˜EŸL™LÓ)Ð)Ü˜˜t×0Ñ0Ô1Ø×'Ñ'¨Ô.Ü—8‘8˜EŸM™MÓ*Ð*äÐ@ÀÀÀzÐRÓSÐSrR   c                ó0   — t        || j                  ¬«      S )N)rh   )r$   rh   rÕ   s     rP   Ú_scalar_from_stringzPeriodArray._scalar_from_string”  s   € Ü�e $§)¡)Ô,Ð,rR   c                óÌ   — |t         u ry t        |t        «      r&| j                  |j                  j
                  «       y | j                  |j                  j
                  «       y rH   )r   r\   r$   Ú_require_matching_unitr}   rÀ   rI   ©rL   Úothers     rP   rÓ   z"PeriodArray._check_compatible_with—  sJ   € ð ”C‰<ØÜ˜œvÔ&Ø×'Ñ'¨¯©×(=Ñ(=Õ>ð ×'Ñ'¨¯©×(<Ñ(<Õ=rR   c                ó   — | j                   S rH   )r}   ra   s    rP   rI   zPeriodArray.dtype«  s   € à�{‰{ÐrR   c                ó.   — | j                   j                  S )zC
        Return the frequency object for this PeriodArray.
        )rI   rh   ra   s    rP   rh   zPeriodArray.freq¯  s   € ð
 �z‰z�‰ÐrR   c                ó@   — t        | j                  «      j                  S rH   )r.   rh   rÀ   ra   s    rP   ÚfreqstrzPeriodArray.freqstr¶  s   € ä˜4Ÿ9™9Ó%×.Ñ.Ð.rR   c                ód   — | j                   }	 t        j                  |«      S # t        $ r Y y w xY wrH   )rá   r   Úget_reso_from_freqstrÚKeyError)rL   rá   s     rP   Ú_resolution_objzPeriodArray._resolution_objº  s3   € à—,‘,ˆð	Ü×3Ñ3°GÓ<Ð<øÜò 	Ùð	ús   Ž# £	/®/c                ó„  — |dk(  rs|sPt        j                  | j                  |¬«      }| j                  r!|j	                  «       }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Š   rK   Ú	_readonlyÚviewÚflagsÚ	writeabler‹   rƒ   ÚboolÚ_isnanr¢   r¦   )rL   rI   r‚   rN   s       rP   Ú	__array__zPeriodArray.__array__Â  sŸ   € ð �DŠ=ñ ÜŸ™ D§I¡I°UÔ;�Ø—>’>Ø#Ÿ[™[›]�FØ-2�F—L‘LÔ*Ø�ä—x‘x §	¡	°Ô7Ð7à�5‰=ÜØLóð ð ”DŠ=Ø—K‘K�<Ðô �x‰xœ˜T›
¬&Ô1Ð1rR   c                ó  — ddl }ddlm} |�¡|j                  j	                  |«      r,|j                  | j                  | j                  «       |¬«      S t        ||«      r?| j                  |j                  k7  r5t        d| j                  › d|j                  › d�«      ‚t        d|› d	�«      ‚ || j                  «      }|j                  | j                  | j                  «       d
¬«      }|j                  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ˆ   r3   r\   rá   rh   r†   r4   Úfrom_storage)rL   r…   rò   rï   Úperiod_typeÚstorage_arrays         rP   Ú__arrow_array__zPeriodArray.__arrow_array__Ü  sê   € ó 	åLàÐØ�}‰}×'Ñ'¨Ô-Ø—}‘} T§]¡]¸¿¹»È4�}ÓPÐPÜ˜D /Ô2à—<‘< 4§9¡9Ò,Ü#ð#Ø#'§<¡< .°°T·Y±Y°K¸qðBóð ô
  Ø?À¸vÀVÐLóð ñ & d§l¡lÓ3ˆØŸ™ d§m¡m¸$¿)¹)»+ÈG˜ÓTˆØ×%Ñ%×2Ñ2°;ÀÓNÐNrR   rj   a�  
        The year of the period.

        Returns the year component for each period in the index.

        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')
        rk   a  
        The month as January=1, December=12.

        Returns the month component for each period in the index as an
        integer, where January is 1 and December is 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')
        rl   a(  
        The days of the period.

        Returns the day-of-month component for each period in the index.

        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')
        rm   að  
        The hour of the period.

        Returns the hour component for each period in the index.

        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')
        rn   a  
        The minute of the period.

        Returns the minute component for each period in the index.

        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')
        ro   a  
        The second of the period.

        Returns the second component for each period in the index.

        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')
        rq   aÄ  
        The week ordinal of the year.

        Returns the week number (1 through 53) for each period in the index.

        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')
        rr   a³  
        The day of the week with Monday=0, Sunday=6.

        Returns the day-of-week component for each period, following the
        Python convention where Monday is 0 and Sunday is 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.day_of_week
        Index([6, 0, 1], dtype='int64')
        c                ób   — t        j                  dt        t        «       ¬«       | j                  S )ú–
        The day of the week with Monday=0, Sunday=6.

        .. deprecated:: 3.1.0
            Use :attr:`PeriodArray.day_of_week` instead.
        zoPeriodArray.weekday is deprecated and will be removed in a future version. Use PeriodArray.day_of_week instead.r›   ©r®   r¯   r'   r*   rr   ra   s    rP   ÚweekdayzPeriodArray.weekday­  s-   € ô 	�‰ðHäÜ'Ó)õ		
ð ×ÑÐrR   c                ób   — t        j                  dt        t        «       ¬«       | j                  S )rû   zqPeriodArray.dayofweek is deprecated and will be removed in a future version. Use PeriodArray.day_of_week instead.r›   rü   ra   s    rP   Ú	dayofweekzPeriodArray.dayofweek¾  ó-   € ô 	�‰ðCäÜ'Ó)õ		
ð ×ÑÐrR   rs   a}  
        The ordinal day of the year.

        Returns the day-of-year component for each period, ranging from
        1 (January 1st) to 365 or 366 for leap years.

        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.day_of_year
        Index([10, 32, 60], dtype='int64')

        >>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y")
        >>> idx
        PeriodIndex(['2023', '2024', '2025'], dtype='period[Y-DEC]')
        >>> idx.day_of_year
        Index([365, 366, 365], dtype='int64')
        c                ób   — t        j                  dt        t        «       ¬«       | j                  S )z†
        The ordinal day of the year.

        .. deprecated:: 3.1.0
            Use :attr:`PeriodArray.day_of_year` instead.
        zqPeriodArray.dayofyear is deprecated and will be removed in a future version. Use PeriodArray.day_of_year instead.r›   )r®   r¯   r'   r*   rs   ra   s    rP   Ú	dayofyearzPeriodArray.dayofyearï  r   rR   rt   a±  
        The quarter of the date.

        Returns the quarter (1 through 4) for each period in the index.

        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')
        ru   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
        rv   a  
        The number of days in the month.

        Returns the total number of days in the month of each period,
        accounting for leap years.

        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')
        c                ób   — t        j                  dt        t        «       ¬«       | j                  S )zŒ
        The number of days in the month.

        .. deprecated:: 3.1.0
            Use :attr:`PeriodArray.days_in_month` instead.
        zuPeriodArray.daysinmonth is deprecated and will be removed in a future version. Use PeriodArray.days_in_month instead.r›   )r®   r¯   r'   r*   rv   ra   s    rP   ÚdaysinmonthzPeriodArray.daysinmonthf  s-   € ô 	�‰ðEäÜ'Ó)õ		
ð ×!Ñ!Ð!rR   c                ót   — t        j                  | j                  «      }|dz  dk(  |dz  dk(  |dz  dkD  z  z  S )a  
        Logical indicating if the date belongs to a leap year.

        Returns a boolean array where ``True`` indicates the period's year
        is 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])
        i�  r   é   éd   )r‰   rŠ   rj   )rL   rj   s     rP   rd   zPeriodArray.is_leap_yearv  s>   € ô* �z‰z˜$Ÿ)™)Ó$ˆØ�s‘
˜a‘ T¨A¡X°¡]°t¸c±zÀA±~Ñ$FÑGÐGrR   c                ó  — ddl m} t        j                  |«      }|dk(  }|rÁ|�t	        j
                  |«      }|duxr |j                  dk(  }|dk(  s| j                  dk(  rB| j                  d¬«      }|rdn|j                  }t        d	d
¬«      t        d	|¬«      z
  }||z   S | | j                  z   j                  d¬«      }|rdn|j                  }|t        d	|¬«      z
  S |€5| j                  j                  «       }	t        |	d	«      }
|
j                  }|	}n!t	        j
                  |«      }|j                  }| j!                  ||¬«      }t        j"                  |j$                  |«      } |j&                  ||j(                  ¬«      }|S )aN  
        Cast to DatetimeArray/Index.

        If possible, gives microsecond-unit DatetimeArray/Index. Otherwise
        gives nanosecond unit. On the ``Series.dt`` accessor, this is only
        available for period-typed Series.

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

        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   )rB   ÚENÚnsÚBrÈ   )Úhowé   ÚD)Úunitr€   )Úpandas.core.arraysrB   r°   Úvalidate_end_aliasr$   rÆ   rM   rh   rz   r  r   r}   Ú_get_to_timestamp_baser   rÀ   Ú_period_dtype_coder{   Úperiodarr_to_dt64arrrK   r»   rI   )rL   rh   r  rB   rÉ   Ú	ns_targetÚstampr  ÚadjustÚ	freq_coderI   rM   Únew_parrÚnew_dataÚdtas                  rP   rz   zPeriodArray.to_timestampŽ  st  € õn 	5ä×*Ñ*¨3Ó/ˆà�S‰jˆÙØÐä×1Ñ1°$Ó7�Ø DÐ(Ò>¨T¯Y©Y¸$Ñ->ˆIØ�sŠ{˜dŸi™i¨3Ò.à×)Ñ)¨gÐ)Ó6�Ù(‘t¨e¯j©j�Ü" 1¨3Ô/´)¸AÀDÔ2IÑI�Ø˜v‘~Ð%à §	¡	Ñ)×7Ñ7¸GÐ7ÓD�Ù(‘t¨e¯j©j�Øœy¨°Ô6Ñ6Ð6àˆ<ØŸ™×:Ñ:Ó<ˆIÜ# I¨qÓ1ˆEØ—>‘>ˆDØ‰Dä×-Ñ-¨dÓ3ˆDØ×*Ñ*ˆDà—;‘;˜t¨�;Ó-ˆä×1Ñ1°(·-±-ÀÓFˆð +ˆm×*Ñ*¨8¸8¿>¹>ÔJˆØˆ
rR   c                ó4  — t        j                  |«      }|dk(  ry| j                  j                  dk(  rst	        j
                  | j                  «      }t        |«      dk(  rE|d   }|| j                  j                  k(  r| j                  S |dk(  r| j                  j                  S yt        |j                  «      }|�Yt        j                  |«      }t        |t         «      r4t        |t         «      s$t#        |«      t#        |j$                  ¬«      k(  r|}|S )zü
        Determine the freq to stamp on the DatetimeArray returned by
        ``self.to_timestamp(target_freq, how)``.

        Called by ``PeriodIndex.to_timestamp`` so the array-level
        ``to_timestamp`` can return a bare DatetimeArray.
        r	  Nr  r  r   ©Údays)r°   r  rh   Ú	rule_codeÚlibalgosÚunique_deltasrK   rª   rI   Ú_nrM   r   Ú_inferred_freq_strr$   rÆ   r\   r   r   Ún)rL   r  Útarget_freqr  ÚdiffsÚdiffÚresult_freqs          rP   Ú_to_timestamp_freqzPeriodArray._to_timestamp_freqì  sé   € ô ×*Ñ*¨3Ó/ˆØ�#Š:ð à�9‰9×Ñ #Ò%ô ×*Ñ*¨4¯9©9Ó5ˆEÜ�5‹z˜QŠØ˜Q‘x�Ø˜4Ÿ:™:Ÿ=™=Ò(ØŸ9™9Ð$Ø˜Q’YØŸ9™9Ÿ>™>Ð)àä × 6Ñ 6Ó7ˆØÐ"ä ×4Ñ4°[ÓAˆKä˜;¬Ô,Ü" ;´Ô4Ü˜kÓ*¬i¸[¿]¹]Ô.KÒKà)�ØÐrR   c                óD   — t        j                  || j                  ¬«      S )N)rÔ   rI   )r$   Ú_from_ordinalrI   )rL   r]   s     rP   Ú	_box_funczPeriodArray._box_func  s   € Ü×#Ñ#¨A°T·Z±ZÔ@Ð@rR   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 )aY  
        Convert the PeriodArray to the specified frequency `freq`.

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

        Parameters
        ----------
        freq : str
            A frequency.
        how : {'end', 'start', 'e', 's'}, default 'end'
            Whether the elements should be aligned to the end or start of
            each period, e.g. January 31st vs. January 1st. Case-insensitive.

        Returns
        -------
        PeriodArray
            The transformed PeriodArray with the new frequency.

        See Also
        --------
        PeriodIndex.asfreq: Convert each Period in a PeriodIndex 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}   rJ   r  rK   rI   r"  r&   Ú_hasnar   rì   r…   )
rL   rh   r  Úbase1Úbase2rK   rÉ   rÔ   r  rI   s
             rP   r{   zPeriodArray.asfreq  sÖ   € ôP ×*Ñ*¨3Ó/ˆÜ�dœJÔ'¬G°DÐ:NÔ,OÜ˜tÓ$×-Ñ-ˆDÜ×)Ñ)¨$Ó/ˆà—‘×'Ñ'ˆØ×'Ñ'ˆà�y‰yˆà�S‰jˆÙØ˜TŸZ™ZŸ]™]Ñ*¨QÑ.‰GàˆGä$ W¨e°U¸CÓ@ˆà�;Š;Ü$(ˆH�T—[‘[Ñ!ä˜DÓ!ˆØŒt�D‹z˜(¨%Ô0Ð0rR   c                ó*   — |rt         S dj                  S )Nz'{}')ÚstrÚformat)rL   Úboxeds     rP   Ú
_formatterzPeriodArray._formatter]  s   € ÙÜˆJØ�}‰}ÐrR   r   )Úna_repÚdate_formatc               ón   — t        j                  | j                  | j                  j                  ||«      S )z3
        actually format my specific types
        )r°   Úperiod_array_strftimerK   rI   rJ   )rL   r7  r8  Úkwargss       rP   Ú_format_native_typesz PeriodArray._format_native_typesb  s.   € ô ×.Ñ.Ø�I‰I�t—z‘z×-Ñ-¨v°{ó
ð 	
rR   Tc                óÄ  •— t        |«      }|| j                  k(  r|s| S | j                  «       S t        |t        «      r| j                  |j                  «      S t        j                  |d«      st        |t        «      rPt        |dd «      }t        j                  |«      }| j                  «       j                  |«      j                  |«      S t         ‰| �E  ||¬«      S )Nr•   rÂ   r—   )r,   r}   r‚   r\   r.   r{   rh   r   rž   r-   r�   rÄ   Údtype_to_unitrz   Útz_localizeÚas_unitÚsuperr¡   )rL   rI   r‚   rÂ   r  Ú	__class__s        €rP   r¡   zPeriodArray.astypen  s»   ø€ ô ˜UÓ#ˆØ�D—K‘KÒÙØ�à—y‘y“{Ð"Ü�eœ[Ô)Ø—;‘;˜uŸz™zÓ*Ð*ä�?‰?˜5 #Ô&¬*°U¼OÔ*Lä˜  dÓ+ˆBÜ×$Ñ$ UÓ+ˆDð ×$Ñ$Ó&×2Ñ2°2Ó6×>Ñ>¸tÓDÐDä‰w‰~˜e¨$ˆ~Ó/Ð/rR   c                ó    — | j                  |«      j                  d«      }| j                  j                  d«      }|j                  |||¬«      S )NúM8[ns])ÚsideÚsorter)Ú_validate_setitem_valuerè   rˆ   Úsearchsorted)rL   rÖ   rE  rF  ÚnpvalueÚm8arrs         rP   rH  zPeriodArray.searchsorted„  sM   € ð ×.Ñ.¨uÓ5×:Ñ:¸8ÓDˆð —‘×"Ñ" 8Ó,ˆØ×!Ñ! '°¸VÐ!ÓDÐDrR   )ÚlimitÚ
limit_arear‚   c               ó    — | j                  d«      }|j                  ||||¬«      }|r%t        d|j                  | j                  «      «      S | S )NrD  )ÚmethodrK  rL  r‚   r   )rè   Ú_pad_or_backfillr
   rI   )rL   rN  rK  rL  r‚   r  rN   s          rP   rO  zPeriodArray._pad_or_backfill‘  sT   € ð �i‰i˜Ó!ˆØ×%Ñ%Ø °:ÀDð &ó 
ˆñ Ü˜ §¡¨D¯J©JÓ 7Ó8Ð8àˆKrR   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   rK   r‰   rŠ   r…   rI   )rL   rÝ   ÚopÚ
res_valuess       rP   Ú_addsub_int_array_or_scalarz'PeriodArray._addsub_int_array_or_scalar§  sd   € ð ”h—l‘l¤H§L¡LÐ1Ñ1Ð1Ð1Ø”—‘ÑØ�FˆEÜ% d§i¡i´·±¸EÈÔ1NÓOˆ
ØŒt�D‹z˜*¨D¯J©JÔ7Ð7rR   c                ó  — t        |t        «      rJ ‚t        |t        «      r#| t        j                  |j
                  d«      z   S | j                  |j                  d¬«       | j                  |j
                  t        j                  «      S )Nr  T)rM   )r\   r   r   r‰   Útimedelta64r$  rÛ   Ú_period_unitrV  rQ  rR  rÜ   s     rP   Ú_add_offsetzPeriodArray._add_offset¼  sj   € Ü˜e¤TÔ*Ð*Ð*ä�eœSÔ!Øœ"Ÿ.™.¨¯©°#Ó6Ñ6Ð6à×#Ñ# E×$6Ñ$6¸TÐ#ÔBØ×/Ñ/°·±¼¿¹ÓFÐFrR   c                óŠ  •— t        | j                  t        t        f«      st	        | |«      ‚t        |«      rt        ‰| �  |«      S t        |t        «      r4t        j                  t        |j                  ¬«      j                  «      }n(t        j                  t        |«      j                  «      }| j                  |«      S )z”
        Parameters
        ----------
        other : timedelta, Tick, np.timedelta64

        Returns
        -------
        PeriodArray
        r  )r\   rh   r   r   r‡   r3   rA  Ú_add_timedeltalike_scalarr‰   rŠ   r   r$  Úasm8Ú_add_timedelta_arraylike)rL   rÝ   ÚtdrB  s      €rP   r\  z%PeriodArray._add_timedeltalike_scalarÆ  sŒ   ø€ ô ˜$Ÿ)™)¤d¬C [Ô1ä'¨¨eÓ4Ð4ä�Œ;ä‘7Ñ4°UÓ;Ð;ä�eœSÔ!Ü—‘œI¨5¯7©7Ô3×8Ñ8Ó9‰Bä—‘œI eÓ,×1Ñ1Ó2ˆBØ×,Ñ,¨RÓ0Ð0rR   c                óê  — | j                   j                  «       st        d| j                   › �«      ‚t        j                   d| j                   j                  › d�«      }	 t        t        j                  |«      |dd¬«      }t        | j                  t        j                  |j                  d«      «      «      } t        | «      || j                   ¬	«      S # t        $ r}t        d«      |‚d}~ww xY w)
z›
        Parameters
        ----------
        other : TimedeltaArray or ndarray[timedelta64]

        Returns
        -------
        PeriodArray
        z2Cannot add or subtract timedelta64[ns] dtype from úm8[ú]F©rI   r‚   Úround_okznCannot add/subtract timedelta-like from PeriodArray that is not an integer multiple of the PeriodArray's freq.Nr�   r€   )rI   Ú_is_tick_liker†   r‰   Ú
_td64_unitr   rŠ   rƒ   r#   r   rK   rè   r…   )rL   rÝ   rI   ÚdeltaÚerrrU  s         rP   r^  z$PeriodArray._add_timedelta_arraylikeÞ  sÛ   € ð �z‰z×'Ñ'Ô)äØDÀTÇZÁZÀLÐQóð ô —‘˜3˜tŸz™z×4Ñ4Ð5°QÐ7Ó8ˆð
	Ü'Ü—
‘
˜5Ó!¨°UÀUôˆEô & d§i¡i´·±¸E¿J¹JÀtÓ<LÓ1MÓNˆ
ØŒt�D‹z˜*¨D¯J©JÔ7Ð7øô ò 	ô (ðEóð ðûð	ús   Á!"C Ã	C2Ã!C-Ã-C2c                ó  — | j                   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¬«      }|j                  d«      }t        j                   |«      S # t        $ r}t        | |«      |‚d}~ww xY w)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
        ra  rb  Frc  Nr�   )rI   re  r‰   rf  r\   r   rX  r   rŠ   r   r]  r   rƒ   r‡   rè   r   Úitem_from_zerodim)rL   rÝ   rI   r_  rg  rh  s         rP   Ú _check_timedeltalike_freq_compatz,PeriodArray._check_timedeltalike_freq_compat  sÏ   € ð( �z‰z×'Ñ'Ô)Ð)Ð)ä—‘˜3˜tŸz™z×4Ñ4Ð5°QÐ7Ó8ˆä�eœi¬¯©¼Ð>Ô?Ü—‘œI eÓ,×1Ñ1Ó2‰Bä—‘˜EÓ"ˆBð	>Ü'¨°%¸eÈeÔTˆEð —
‘
˜4Ó ˆÜ×$Ñ$ UÓ+Ð+øô	 ò 	>Ü'¨¨eÓ4¸#Ð=ûð	>ús   Â.C# Ã#	C>Ã,C9Ã9C>©ÚskipnaÚkeepdimsc               ó    •— t        ‰| �  |f||dœ|¤Ž}|r7t        |t        j                  «      r| j                  || j                  ¬«      S |S )Nrl  r€   )rA  Ú_reducer\   r‰   r�   r»   rI   )rL   rO   rm  rn  r;  rN   rB  s         €rP   rp  zPeriodArray._reduce+  sN   ø€ ô ‘‘ ÐR¨f¸xÑRÈ6ÑRˆÙœ
 6¬2¯:©:Ô6Ø×&Ñ& v°T·Z±ZÐ&Ó@Ð@ØˆrR   )Úreturnztype[Period])NF)rI   úDtype | Noner‚   rë   rq  ÚNone)r�   znpt.NDArray[np.int64]rI   r.   rq  r   )rI   rr  r‚   rë   rq  r   )rI   rA   r‚   rë   rq  r   rH   )rq  r   )rÏ   zdict[str, Any]rq  r   )rÖ   úPeriod | NaTTyperq  znp.int64)rÖ   r3  rq  r$   )rÝ   zPeriod | NaTType | PeriodArrayrq  rs  )rq  r.   )rq  r   )rq  r3  )rq  r   )NN)rI   zNpDtype | Noner‚   zbool | Nonerq  ú
np.ndarray)rq  znpt.NDArray[np.bool_])NrÈ   )r  r3  rq  rB   )r  rB   r  r3  rq  zBaseOffset | None)rq  rt  )Nr	  )r  r3  rq  r   )F)r5  rë   rq  zCallable[[object], str])r7  zstr | floatrq  znpt.NDArray[np.object_])T)r‚   rë   )ÚleftN)rÖ   z$NumpyValueArrayLike | ExtensionArrayrE  zLiteral['left', 'right']rF  zNumpySorter | Nonerq  znpt.NDArray[np.intp] | np.intp)
rN  r<   rK  z
int | NonerL  z#Literal['inside', 'outside'] | Noner‚   rë   rq  r   )rÝ   znp.ndarray | intrT  zCallable[[Any, Any], Any]rq  r   )rÝ   r   )rÝ   z,TimedeltaArray | npt.NDArray[np.timedelta64]rq  r   )rO   r3  rm  rë   rn  rë   )KrS   Ú
__module__Ú__qualname__rT   Ú__array_priority__Ú_typr‰   r   r   Ú_internal_fill_valuer$   Ú_recognized_scalarsr_   Ú__annotations__rU   rb   rc   re   ri   rw   rx   r|   rŒ   Úclassmethodr“   r»   r¾   r    rË   rÐ   r×   rÙ   rÓ   r(   rI   rh   rá   rå   rí   rù   rW   rj   rk   rl   rm   rn   ro   rp   rq   rr   rý   rÿ   rs   r  rt   ru   rv   r  rd   rz   r)  r,  r{   r6  r<  r¡   rH  rO  rV  rZ  r\  r^  rk  rp  Ú__classcell__)rB  s   @rP   rY   rY   |   sà  ø… ñ4ðn ÐØ€DØ#˜2Ÿ8™8 D›>ÐØ!˜)Ðñ8ÐÐ4ó ð òó ðð €J�	ÓØ*Ð+€IˆyÓ+Ú?€K�Ó?ò€J�	ó ð $.°Ñ#;¸iÑ#GÐ�yÓGÚ'MÐ˜9ÓMàÓô
4ð: ð(à%ð(ð ð(ð 
ò	(ó ð(ð ð
 #ØñL.ð ð	L.ð
 ðL.ð 
òL.ó ðL.ð\ à=BñCØ .ðCØ6:ðCà	òCó ðCð
 ó&ó ð&ð( ñó ðð ò4ó ð4ðTð
  ðTð 
óTó-ð>ð .ð>ð 
ó>ð( òó ðð òó ðð ò/ó ð/ð òó ðð AEð2Ø#ð2Ø2=ð2à	ó2ó4Oñ< Øð	ó€Dñ. Øð	ó€Eñ( Øð	ó€Cñ0 Øð	ó€Dñ( Øð	ó€Fñ* Øð	ó€Fñ* !Øð	ó€Jð, €DÙ!Øð	ó€Kð6 ñ ó ð ð  ñ ó ð ñ "Øð	ó€KðB ñ ó ð ñ Øð	ó€Gñ& Øð'	ó*€EñX $Øð#	ó&€MðP ñ"ó ð"ð òHó ðHô.\ð|'Ø ð'Ø47ð'à	ó'óVAô>1ôFð (-¸$ñ
Ø$ð
à	 ó
ö0ð2 *0Ø%)ð	Eà3ðEð 'ðEð #ð	Eð
 
(óEð" !Ø:>Øñð ðð ð	ð
 8ðð ðð 
óð,8Ø%ð8Ø+Dð8à	ó8ó*Gô1ð0#8ØAð#8à	ó#8òJ#,ðR ,0À%ñØðØ$(ðØ;?÷ñ rR   rY   c                óX  — t        |t        j                  t        f«      s|€d}n¥t        |t        «      rOt        j                  «       5  t        j                  ddt        ¬«       t        |«      j                  }ddd«       nFt        |t        t        t        f«      r|j                  }nt        t!        |«      «      j                  }t        | j"                  «      j                  }t%        j&                  t)        | «      j*                  |¬«      }t-        |«      S # 1 sw Y   Œ^xY w)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�   r2   r   r®   Úcatch_warningsÚfilterwarningsÚFutureWarningr.   rÀ   r0   rY   r$   rá   r    r   rh   r!   r4  r…   rS   r#   )rv  Úrightr„  rƒ  Úmsgs        rP   r‡   r‡   4  sì   € ô  �%œ"Ÿ*™*Ô&7Ð8Ô9¸U¸]Ø‰
Ü	�Eœ:Ô	&Ü×$Ñ$Ó&ñ 	5Ü×#Ñ#ØÐ;Ämõô % UÓ+×4Ñ4ˆJ÷		5ð 	5ô
 
�EœN¬K¼Ð@Ô	AØ—]‘]‰
ä"¤9¨UÓ#3Ó4×<Ñ<ˆ
ä˜4Ÿ9™9Ó%×.Ñ.€HÜ
×
Ñ
Ü�‹J×Ñ¨(¸zô€Cô ! Ó%Ð%÷	5ð 	5ús   Á
2D Ä D)c                ó0   — t         j                  | |¬«      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``.
    dtype : PeriodDtype or None, default None
        The dtype for the array. If not specified, is inferred from the data.

    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]

    Datetime-like strings may also be passed

    >>> period_array(
    ...     ["2000-Q1", "2000-Q2", "2000-Q3", "2000-Q4"], dtype=PeriodDtype("Q")
    ... )
    <PeriodArray>
    ['2000Q1', '2000Q2', '2000Q3', '2000Q4']
    Length: 4, dtype: period[Q-DEC]
    r€   )rY   r»   )rÁ   rI   s     rP   Úperiod_arrayr‹  \  s   € ô\ ×%Ñ% d°%Ð%Ó8Ð8rR   c                ó¦   — | �/t        | t        «      st        d«      ‚|�| |k7  rt        d«      ‚| S |�t        |t        «      st        d«      ‚|} | S )aÚ  
    If a dtype is specified both directly and indirectly via a `freq` (dtype2),
    ensure they match. If only the latter is available, return the indirect dtype.

    Parameters
    ----------
    dtype : dtype
    dtype2 : PeriodDtype or None
        Dtype derived from a `freq` passed to the caller.

    Returns
    -------
    PeriodDtype or None

    Raises
    ------
    ValueError : non-period dtype
    IncompatibleFrequency : mismatch between dtype and freq
    zdtype must be PeriodDtypez&specified freq and dtype are different)r\   r.   rƒ   r#   )rI   Údtype2s     rP   Úvalidate_dtype_freqrŽ  �  sg   € ð, ÐÜ˜%¤Ô-ÜÐ8Ó9Ð9ØÐ %¨6¢/Ü'Ð(PÓQÐQð €Lð 
Ð	Ü˜&¤+Ô.ÜÐ8Ó9Ð9Øˆà€LrR   c                ó¨  — t        | j                  t        j                  «      r| j                  j                  dk7  rt	        d| j                  › �«      ‚|€„t        | t
        «      r| j                  | j                  }} n}t        | t        «      rm| j                  j                  }|�&t        j                  dt        t        «       ¬«       |}| j                  } n"t        | t
        t        f«      r| j                  } t        | j                  «      }t        j                   |«      }|j"                  }t%        | j'                  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: z�Constructing PeriodArray from a Series of datetime64 data will stop inferring the frequency in a future version. Pass `freq` explicitly instead.r›   r�   )Úreso)r\   rI   r‰   r¤   rƒ   r/   r„   rh   r1   r#  r®   r¯   r'   r*   r   r$   rÆ   r  Úc_dt64arr_to_periodarrrè   )rÁ   rh   rÂ   Úinferred_freqr�  rM   s         rP   r   r   ±  s  € ô, �d—j‘j¤"§(¡(Ô+¨t¯z©z¯©À#Ò/EÜ˜=¨¯©¨Ð5Ó6Ð6à€|Ü�dœHÔ%ØŸ™ t§y¡y�$‰DÜ˜œiÔ(ð !ŸL™L×;Ñ;ˆMØÐ(Ü—‘ð6ô #Ü/Ó1õð %�Ø—<‘<‰Dä	�Dœ8¤YÐ/Ô	0Ø�|‰|ˆä˜tŸz™zÓ*€DÜ×%Ñ% dÓ+€DØ×"Ñ"€DÜ! $§)¡)¨D£/°4¸À$ÔGÈÐMÐMrR   c                ó˜  — t        j                  | ||«      dk7  rt        d«      ‚|�t        |d¬«      }|j                  }| �t        | |«      } |�t        ||«      }t        | t
        «      }t        |t
        «      }|r&|r$| j                  |j                  k7  rt        d«      ‚| t        u s|t        u rt        d«      ‚|€5|r| j                  }n|r|j                  }nt        d«      ‚|j                  }|�‘||z  }| €Ht        j                  |j                  |z
  |z   |j                  dz   |t        j                  ¬	«      }||fS t        j                  | j                  | j                  |z   |t        j                  ¬	«      }||fS t        j                  | j                  |j                  dz   |t        j                  ¬	«      }||fS )
Né   zOOf the three parameters: start, end, and periods, exactly two must be specifiedT©Ú	is_periodz!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\   rh   r   r‰   ÚarangerÔ   r   )rÈ   rÉ   r¹   rh   ÚmultÚis_start_perÚ
is_end_perrÁ   s           rP   rÇ   rÇ   å  s¥  € Ü
×Ñ˜%  gÓ.°!Ò3Üð,ó
ð 	
ð
 ÐÜ˜¨Ô.ˆØ�v‰vˆàÐÜ�u˜dÓ#ˆØ
€Ü�S˜$Óˆä˜e¤VÓ,€LÜ˜C¤Ó(€Já™
 u§z¡z°S·X±XÒ'=ÜÐ<Ó=Ð=Ø”�|�sœc‘zÜÐ8Ó9Ð9à€|ÙØ—:‘:‰DÙØ—8‘8‰DäÐBÓCÐCØ�v‰vˆàÐØ˜D‘.ˆØˆ=Ü—9‘9Ø—‘˜gÑ%¨Ñ,¨c¯k©k¸A©o¸tÌ2Ï8É8ôˆDð �ˆ:Ðô —9‘9Ø—‘˜uŸ}™}¨wÑ6¸ÄBÇHÁHôˆDð �ˆ:Ðô �y‰y˜Ÿ™¨¯©°a©¸ÄRÇXÁXÔNˆà�ˆ:ÐrR   c                óš  — |€d}|€d}|€d}|€d}|�� |€(t        dd¬«      }t        j                  j                  }nSt        |d¬«      }t	        j
                  |«      }t        j                  |«      t        j                  k7  rt        d«      ‚|j                  }	t        | |«      \  } }t        | «      } t        |«      }|dk  j                  «       s|dkD  j                  «       rt        d«      ‚t        t        j                  |	«         dz   }
|
|dz
  d	z  z   d
z  dz   }t        j                   ||
kD  | dz
  | «      }t#        |«      }t        j$                  |t        j&                  ¬«      }t        j(                  |t        j&                  ¬«      }t	        j*                  |||||||«      }||fS t        |d¬«      }t	        j
                  |«      }t        | |||||«      }t	        j*                  t        |d   «      t        |d   «      t        |d   «      t        |d	   «      t        |d   «      t        |d   «      |«      }||fS )Nr   r  ÚQTr•  z"freq must be a quarterly frequencyr  zQuarter must be 1 <= q <= 4é   é   r€   r”  é   )r   r   ÚFR_QTRrÖ   r°   Úfreq_to_dtype_codeÚfrom_period_dtype_coderƒ   rá   Ú_make_field_arraysÚ_field_to_int64Úanyr   r   Úget_rule_monthr‰   Úwhererª   Úonesr   ÚzerosÚperiod_ordinals_from_fields)rj   rk   rt   rl   rm   rn   ro   rh   rM   rá   ÚmnumÚmonthsÚyearsÚlengthrª  r«  r·   Úarrayss                     rP   rÎ   rÎ     s5  € ð €|ØˆØ€~ØˆØ€~ØˆØ
€{ØˆàÑØˆ<Ü˜S¨DÔ1ˆDÜ×#Ñ#×)Ñ)‰Dä˜T¨TÔ2ˆDÜ×/Ñ/°Ó5ˆDÜ×/Ñ/°Ó5¼×9IÑ9IÒIÜ Ð!EÓFÐFà—,‘,ˆÜ*¨4°Ó9‰ˆˆgÜ˜tÓ$ˆÜ! 'Ó*ˆà�a‰K×ÑÔ 7¨Q¡;×"3Ñ"3Ô"5ÜÐ:Ó;Ð;ô œW×3Ñ3°GÓ<Ñ=ÀÑAˆØ˜' A™+¨Ñ*Ñ*¨bÑ0°1Ñ4ˆÜ—‘˜ $™¨¨q©°$Ó7ˆä�U“ˆÜ�w‰w�v¤R§X¡XÔ.ˆÜ—‘˜¤r§x¡xÔ0ˆÜ×8Ñ8Ø�6˜4 ¨¨u°dó
ˆð" �Tˆ>Ðô ˜¨Ô.ˆÜ×+Ñ+¨DÓ1ˆÜ# D¨%°°d¸FÀFÓKˆÜ×8Ñ8Ü˜F 1™IÓ&Ü˜F 1™IÓ&Ü˜F 1™IÓ&Ü˜F 1™IÓ&Ü˜F 1™IÓ&Ü˜F 1™IÓ&Øó
ˆð �Tˆ>ÐrR   c                óü   — t        j                  | «      } | j                  j                  dk(  r.t        j                  | «      j                  «       rt        d«      ‚| j                  t         j                  d¬«      S )NrQ   z#cannot convert float NaN to integerFr—   )	r‰   rŠ   rI   r¤   Úisnanr§  rƒ   r¡   r   )r�   s    rP   r¦  r¦  W  s[   € Ü�Z‰Z˜Ó€FØ‡|�|×Ñ˜CÒ¤B§H¡H¨VÓ$4×$8Ñ$8Ô$:ô Ð>Ó?Ð?Ø�=‰=œŸ™¨ˆ=Ó.Ð.rR   c            
     óŒ  — d }| D ]V  }t        |t        t        t        j                  t
        f«      sŒ.|�t        |«      |k7  rt        d«      ‚|�ŒLt        |«      }ŒX | D �cg c]W  }t        |t        j                  t        t        t
        f«      rt        j                  |«      nt        j                  ||«      ‘ŒY c}S c c}w )NzMismatched Period array lengths)
r\   r¢   r£   r‰   r�   r1   rª   rƒ   rŠ   Úrepeat)rÏ   r°  r]   s      rP   r¥  r¥  `  s°   € Ø€FØò  ˆÜ�aœ$¤¤r§z¡z´9Ð=Õ>ØÐ!¤c¨!£f°Ò&6Ü Ð!BÓCÐCØ‰~Ü˜Q›‘ð ð  öð ô ˜!œbŸj™j¬$´´yÐAÔBô �J‰J�qŒMä—‘˜1˜fÓ%ñ&òð ùò s   Á"ACrH   )rO   r3  rV   z
str | None)rq  r#   )rÁ   z,Sequence[Period | str | None] | AnyArrayLikerI   úPeriodDtype | Nonerq  rY   )rI   úDtypeObj | Noner�  r·  rq  r¶  )rq  z(tuple[npt.NDArray[np.int64], BaseOffset])r  )rš  Úint)NNNNNNNN)rq  ztuple[np.ndarray, BaseOffset])rq  ru  )rq  zlist[np.ndarray])nÚ
__future__r   Údatetimer   rQ  Útypingr   r   r   r   r	   r
   r®   Ú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°   r   Úpandas._libs.tslibs.ccalendarr   Úpandas._libs.tslibs.dtypesr   r   Úpandas._libs.tslibs.offsetsr   r    Úpandas._libs.tslibs.periodr!   r"   r#   r$   r%   r&   Úpandas.errorsr'   Úpandas.util._decoratorsr(   r)   Úpandas.util._exceptionsr*   Úpandas.core.dtypes.commonr+   r,   Úpandas.core.dtypes.dtypesr-   r.   Úpandas.core.dtypes.genericr/   r0   r1   r2   Úpandas.core.dtypes.missingr3   r  r4   r5   rÄ   Úpandas.core.commonÚcoreÚcommonr—  Úpandas.core.constructionr6   Úcollections.abcr7   r8   Úpandas._typingr9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rW   ÚDatelikeOpsÚPeriodMixinrY   r‡   r‹  rŽ  rÇ   rÎ   r¦  r¥  rÍ   rR   rP   ú<module>rÓ     s‹  ðÝ "å Û ÷÷ ó ã ÷õ .÷÷ ÷ ÷ õ  8÷÷÷÷ õ )÷õ 5÷÷÷ó õ ,÷÷ !Ð  Ý 2á÷÷
	÷ 	ó 	õ 9÷ñ �m¨:Ô6€ôñ ˆOÓôt�#—/‘/ 9×#8Ñ#8ó tó ðtón%!&ðT !%ð.9Ø
6ð.9àð.9ð ó.9ðb!Øð!Ø$3ð!àó!ðJ ð1Nà-ó1Nôh.ðd 
Ø
ØØØ	ØØØ	ð>ð #ó>óB/ôrR   