+
    xȇiK                    X   ^ RI Ht ^ RIHtHt ^ RIHtHt ^ RIt^ RI	H
t ^ RIHtHtHtHtHtHt ^ RIHt ^ RIHtHtHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIH t  ^ RI!H"t"H#t#H$t$H%t% ^ RI&H'u H(t) ^ RI*H'u H+u H,t- ^ RI*H.t. ^ RI/H0t0 ^ RI1H2t2H3t3 ^ RI4H5t5 ]'       d   ^ RI6H7t7 ^ RI8H9t9H:t:H;t; ]<! ]-Pz                  4      t=]=P}                  RR/4       RR/t?R t@]5! . R!O]"P                  O]"RR7      ]5! R.]"4      ]! R4       ! R R]04      4       4       4       tB]! R4      R"R R  ll4       tCR# )#    )annotations)datetime	timedelta)TYPE_CHECKINGSelfN)index)
BaseOffsetDayNaTPeriod
ResolutionTick)OFFSET_TO_PERIOD_FREQSTR)cache_readonlydoc
set_module)
is_integer)PeriodDtype)	ABCSeries)is_valid_na_for_dtype)PeriodArrayperiod_arrayraise_on_incompatiblevalidate_dtype_freq)maybe_extract_name)DatetimeIndexOpsMixin)DatetimeIndexIndex)inherit_names)Hashable)DtypeDtypeObjnpttarget_klasszPeriodIndex or list of Periodsklassr   c                    VP                  R 4      pVP                  R8X  d=   VP                  RR4      p\        V4      p\        W$R7      pV P                  ! V3/ VB # V ! V3/ VB # )dataint64freqNdtype)popr+   r   r   _simple_new)clsdvaluesr)   r+   s   &,   j/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/core/indexes/period.py_new_PeriodIndexr2   F   sc    UU6]F||wuuVT"D!V1v+++6Q    T)wrapis_leap_yearpandasc                  r  a  ] tR t^Rt$ RtRtR]R&   R]R&   R]R&   ]tR	t	]
R
 R l4       t]R R l4       t]! ]P                  3RRRR/]B RCR R ll4       t]! ]P"                  4      RDR R ll4       t]
]! ]P$                  P&                  4      R R l4       4       t]
]! ]P(                  P&                  4      R R l4       4       t]
]! ]P*                  P&                  4      R R l4       4       tRER R llt]RRRRR RR!RR"RR#RR$RRR/R% R& ll4       t]R'R/R( R) ll4       t]
R* R+ l4       tR, R- ltR. R/ ltR0 V 3R1 llt]
R2 R3 l4       t]
R4 R5 l4       tV 3R6 lt R7 t!R8 R9 lt"R: R; lt#]! ]$PJ                  4      R< V 3R= ll4       t%R> R? lt&]! ]$PN                  4      RFR@ RA ll4       t'RBt(V ;t)# )GPeriodIndexa%  
Immutable ndarray holding ordinal values indicating regular periods in time.

Index keys are boxed to Period objects which carries the metadata (eg,
frequency information).

Parameters
----------
data : array-like (1d int np.ndarray or PeriodArray), optional
    Optional period-like data to construct index with.
freq : str or period object, optional
    One of pandas period strings or corresponding objects.
dtype : str or PeriodDtype, default None
    A dtype from which to extract a freq.
copy : bool, default None
    Whether to copy input data, only relevant for array, Series, and Index
    inputs (for other input, e.g. a list, a new array is created anyway).
    Defaults to True for array input and False for Index/Series.
    Set to False to avoid copying array input at your own risk (if you
    know the input data won't be modified elsewhere).
    Set to True to force copying Series/Index input up front.
name : str, default None
    Name of the resulting PeriodIndex.

Attributes
----------
day
dayofweek
day_of_week
dayofyear
day_of_year
days_in_month
daysinmonth
end_time
freq
freqstr
hour
is_leap_year
minute
month
quarter
qyear
second
start_time
week
weekday
weekofyear
year

Methods
-------
asfreq
strftime
to_timestamp
from_fields
from_ordinals

Raises
------
ValueError
    Passing the parameter data as a list without specifying either freq or
    dtype will raise a ValueError: "freq not specified and cannot be inferred"

See Also
--------
Index : The base pandas Index type.
Period : Represents a period of time.
DatetimeIndex : Index with datetime64 data.
TimedeltaIndex : Index of timedelta64 data.
period_range : Create a fixed-frequency PeriodIndex.

Examples
--------
>>> idx = pd.PeriodIndex(data=["2000Q1", "2002Q3"], freq="Q")
>>> idx
PeriodIndex(['2000Q1', '2002Q3'], dtype='period[Q-DEC]')
periodindexr   _datar	   r)   r   r+   Tc                   V ^8  d   QhRR/# )   returnztype[libindex.PeriodEngine] )formats   "r1   __annotate__PeriodIndex.__annotate__   s     % %9 %r3   c                	"    \         P                  # N)libindexPeriodEngineselfs   &r1   _engine_typePeriodIndex._engine_type   s    $$$r3   c                   V ^8  d   QhRR/# )r<   r=   r   r>   )r?   s   "r1   r@   rA      s     * * *r3   c                	.    V P                   P                  # rC   )r+   _resolution_objrF   s   &r1   rL   PeriodIndex._resolution_obj   s     zz)))r3   otherzarrays.PeriodArray
other_nameNc                    V ^8  d   QhRRRR/# )r<   howstrr=   r   r>   )r?   s   "r1   r@   rA      s     ; ;S ;4 ;r3   c                	    V P                   P                  W4      p\        V 4      P                  W0P                  R 7      # name)r:   asfreqtyper-   rV   rG   r)   rQ   arrs   &&& r1   rW   PeriodIndex.asfreq   s4     jj*Dz%%c		%::r3   c                    V ^8  d   QhRRRR/# )r<   rQ   rR   r=   r   r>   )r?   s   "r1   r@   rA      s     > >3 >] >r3   c                	z    V P                   P                  W4      p\        P                  ! W0P                  R 7      # rT   )r:   to_timestampr   r-   rV   rY   s   &&& r1   r^   PeriodIndex.to_timestamp   s+    jj%%d0((99==r3   c                   V ^8  d   QhRR/# r<   r=   r   r>   )r?   s   "r1   r@   rA      s     B Be Br3   c                	Z    \        V P                  P                  V P                  R R7      # FrV   copy)r   r:   hourrV   rF   s   &r1   rf   PeriodIndex.hour   s     TZZ__4995AAr3   c                   V ^8  d   QhRR/# ra   r>   )r?   s   "r1   r@   rA           D D Dr3   c                	Z    \        V P                  P                  V P                  R R7      # rc   )r   r:   minuterV   rF   s   &r1   rk   PeriodIndex.minute   !     TZZ&&TYYUCCr3   c                   V ^8  d   QhRR/# ra   r>   )r?   s   "r1   r@   rA      ri   r3   c                	Z    \        V P                  P                  V P                  R R7      # rc   )r   r:   secondrV   rF   s   &r1   rp   PeriodIndex.second   rm   r3   c               (    V ^8  d   QhRRRRRRRR/# )	r<   r+   zDtype | Nonere   zbool | NonerV   Hashable | Noner=   r   r>   )r?   s   "r1   r@   rA      s4     !; !; 	!;
 !; !; 
!;r3   c                	   R pV'       g)   \        V\        \        34      '       d   VP                  p\	        WQV 4      p\        W24      pV P                  WV4      w  rV'       d4   \        W4      '       d#   VP                  V8w  d   VP                  V4      p\        WR7      pV'       d   VP                  4       pV P                  WVR7      # )N)r'   r)   )rV   refs)
isinstancer   r   _referencesr   r   _maybe_copy_array_inputr)   rW   r   re   r-   )r.   r'   r)   r+   re   rV   ru   s   &&&&&& r1   __new__PeriodIndex.__new__   s     
4%);<<##D!$c2"5/ 00UC

 Jt))dii4.? ;;t$D 199;DtT::r3   yearquartermonthdayrf   rk   rp   c                   V ^8  d   QhRR/# r<   r=   r   r>   )r?   s   "r1   r@   rA     s     <$ <$ 
<$r3   c                   RVRVRVRVRVRVRV/p	V	P                  4        U
Uu/ uF  w  rVf   K  WbK  	  p	p
p\        P                  ! WR7      pV P                  V4      # u upp
i )	a  
Construct a PeriodIndex from fields (year, month, day, etc.).

Parameters
----------
year : int, array, or Series, default None
    Year for the PeriodIndex.
quarter : int, array, or Series, default None
    Quarter for the PeriodIndex.
month : int, array, or Series, default None
    Month for the PeriodIndex.
day : int, array, or Series, default None
    Day for the PeriodIndex.
hour : int, array, or Series, default None
    Hour for the PeriodIndex.
minute : int, array, or Series, default None
    Minute for the PeriodIndex.
second : int, array, or Series, default None
    Second for the PeriodIndex.
freq : str or period object, optional
    One of pandas period strings or corresponding objects.

Returns
-------
PeriodIndex

See Also
--------
PeriodIndex.from_ordinals : Construct a PeriodIndex from ordinals.
PeriodIndex.to_timestamp : Cast to DatetimeArray/Index.

Examples
--------
>>> idx = pd.PeriodIndex.from_fields(year=[2000, 2002], quarter=[1, 3])
>>> idx
PeriodIndex(['2000Q1', '2002Q3'], dtype='period[Q-DEC]')
r{   r|   r}   r~   rf   rk   rp   )fieldsr)   )itemsr   _from_fieldsr-   )r.   r{   r|   r}   r~   rf   rk   rp   r)   r   keyvaluerZ   s   &$$$$$$$$    r1   from_fieldsPeriodIndex.from_fields  sx    f DwU3Dff
 06||~S~*#*~S&&f@s## Ts
   A"A"rV   c                   V ^8  d   QhRR/# r   r>   )r?   s   "r1   r@   rA   B  s      0  0D  0r3   c                   \         P                  ! V\         P                  R7      p\        V4      p\        P
                  ! WR7      pV P                  WSR7      # )a  
Construct a PeriodIndex from ordinals.

Parameters
----------
ordinals : array-like of int
    The period offsets from the proleptic Gregorian epoch.
freq : str or period object
    One of pandas period strings or corresponding objects.
name : str, default None
    Name of the resulting PeriodIndex.

Returns
-------
PeriodIndex

See Also
--------
PeriodIndex.from_fields : Construct a PeriodIndex from fields
    (year, month, day, etc.).
PeriodIndex.to_timestamp : Cast to DatetimeArray/Index.

Examples
--------
>>> idx = pd.PeriodIndex.from_ordinals([-1, 0, 1], freq="Q")
>>> idx
PeriodIndex(['1969Q4', '1970Q1', '1970Q2'], dtype='period[Q-DEC]')
r*   rU   )npasarrayr(   r   r   r-   )r.   ordinalsr)   rV   r+   r'   s   &&$$  r1   from_ordinalsPeriodIndex.from_ordinalsA  sC    < ::hbhh7D!&&x=t//r3   c                   V ^8  d   QhRR/# )r<   r=   znpt.NDArray[np.object_]r>   )r?   s   "r1   r@   rA   h  s     . ./ .r3   c                	:    \         P                  ! V \        R 7      # )r*   )r   r   objectrF   s   &r1   r0   PeriodIndex.valuesg  s    zz$f--r3   c                   V ^8  d   QhRR/# )r<   r=   zint | npt.NDArray[np.int64]r>   )r?   s   "r1   r@   rA   k  s      0  01L  0r3   c                   \        V\        \        P                  \        \        P
                  34      '       dE   \        V P                  \        \        34      '       d   V P                  P                  V4      pV# M}\        V\        4      '       d=   VP                  V P                  P                  8X  d   VP                  # \        W4      h\        V4      '       d   \        V\        4      '       g   Q hV# \        V R4      h)ae  
Convert timedelta-like input to an integer multiple of self.freq

Parameters
----------
other : timedelta, np.timedelta64, DateOffset, int, np.ndarray

Returns
-------
converted : int, np.ndarray[int64]

Raises
------
IncompatibleFrequency : if the input cannot be written as a multiple
    of self.freq.  Note IncompatibleFrequency subclasses ValueError.
N)rv   r   r   timedelta64r   ndarrayr)   r
   r:    _check_timedeltalike_freq_compatr	   basenr   r   int)rG   rN   deltas   && r1   _maybe_convert_timedelta$PeriodIndex._maybe_convert_timedeltak  s    " eirzzJKK$))dC[11

CCEJ 2 z**zzTYY^^+ww'44eS))))L $D$//r3   c                    V ^8  d   QhRRRR/# )r<   r+   r"   r=   boolr>   )r?   s   "r1   r@   rA     s     # #( #t #r3   c                     V P                   V8H  # )z6
Can we compare values of the given dtype to our own?
r*   )rG   r+   s   &&r1   _is_comparable_dtype PeriodIndex._is_comparable_dtype  s     zzU""r3   c               $    V ^8  d   QhRRRRRR/# )r<   wherer   maskznpt.NDArray[np.bool_]r=   z
np.ndarrayr>   )r?   s   "r1   r@   rA     s"     . .u .,A .j .r3   c                   < \        V\        4      '       d$   \        VP                  V P                  RR7      pM!\        V\        4      '       g   \        R4      h\        SV `  W4      # )za
where : array of timestamps
mask : np.ndarray[bool]
    Array of booleans where data is not NA.
F)r)   re   z6asof_locs `where` must be DatetimeIndex or PeriodIndex)rv   r   r8   _valuesr)   	TypeErrorsuper	asof_locs)rG   r   r   	__class__s   &&&r1   r   PeriodIndex.asof_locs  sQ     e]++DIIEJEE;//TUUw --r3   c                   V ^8  d   QhRR/# )r<   r=   r   r>   )r?   s   "r1   r@   rA     s     
< 
< 
<r3   c                    \        V 4      ^ 8X  d   R# V P                  '       g   \        R4      hV P                  p\	        VR,          VRR ,
          ^8  P                  4       4      # )zq
Returns True if this PeriodIndex is range-like in that all Periods
between start and end are present, in order.
TzIndex is not monotonic:   NNN)lenis_monotonic_increasing
ValueErrorasi8r   all)rG   r0   s   & r1   is_fullPeriodIndex.is_full  s[     t9>+++566fRj6#2;.!388:;;r3   c                   V ^8  d   QhRR/# )r<   r=   rR   r>   )r?   s   "r1   r@   rA     s      s r3   c                	    R # )periodr>   rF   s   &r1   inferred_typePeriodIndex.inferred_type  s     r3   c                	~   < \         SV `  W4      pV P                  VP                  8X  d   V P                  V4      pV# rC   )r   _convert_tolerancer+   r   )rG   	tolerancetargetr   s   &&&r1   r   PeriodIndex._convert_tolerance  s:    
 G.yA	::%55i@Ir3   c                   TpV P                  V4       \        WP                  4      '       d   \        pM\	        V\
        4      '       dk    V P                  V4      w  r4T P                  T4      '       d    T P                  YC4      # Y@P                  8X  d   T P                  T4      pMf\        T4      h\	        V\        4      '       d   V P                  V4       M3\	        V\        4      '       d   V P                  V4      pM\        V4      h \         P"                  ! W4      #   \         d   p\        RT R24      ThRp?ii ; i  \         d   p\        T4      ThRp?ii ; i  \         d   p\        T4      ThRp?ii ; i)aC  
Get integer location for requested label.

Parameters
----------
key : Period, NaT, str, or datetime
    String or datetime key must be parsable as Period.

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

Raises
------
KeyError
    Key is not present in the index.
TypeError
    If key is listlike or otherwise not hashable.
zCannot interpret 'z' as periodN)_check_indexing_errorr   r+   r   rv   rR   _parse_with_resor   KeyError_can_partial_date_slice_partial_date_slicerL   _cast_partial_indexing_scalarr   _disallow_mismatched_indexingr   r   get_loc)rG   r   orig_keyparsedresoerrs   &&    r1   r   PeriodIndex.get_loc  sa   ( ""3' jj11CS!!O#44S9
 ++D11133DAA +++ 88@sm#V$$..s3X&&44S9C 3-	.==++9  O!3C5DE3NO   1"3-S01,  	.8$#-	.sH   D( 8E E* (E3EEE'E""E'*F5FFc                    V ^8  d   QhRRRR/# )r<   r   r   r=   Noner>   )r?   s   "r1   r@   rA     s          D  r3   c                	R    VP                   V P                  8w  d   \        V4      hR # rC   )_dtyper+   r   )rG   r   s   &&r1   r   )PeriodIndex._disallow_mismatched_indexing  s!    ::#3- $r3   c                    V ^8  d   QhRRRR/# )r<   labelr   r=   r   r>   )r?   s   "r1   r@   rA     s      8  r3   c                	r     \        WP                  R 7      pV#   \         d   p\        T4      ThRp?ii ; i)r)   N)r   r)   r   r   )rG   r   r   r   s   &&  r1   r   )PeriodIndex._cast_partial_indexing_scalar  s:    	+E		2F   	+5/s*	+s    616c                   V ^8  d   QhRR/# )r<   siderR   r>   )r?   s   "r1   r@   rA     s     < <3 <r3   c                	p   < \        V\        4      '       d   V P                  V4      p\        SV `  W4      # rC   )rv   r   r   r   _maybe_cast_slice_bound)rG   r   r   r   s   &&&r1   r   #PeriodIndex._maybe_cast_slice_bound  s0    eX&&66u=Ew.u;;r3   c                    V ^8  d   QhRRRR/# )r<   r   r   r   r   r>   )r?   s   "r1   r@   rA     s     T TZ T Tr3   c                	    \         P                  ! VP                  VP                  4      p\        W#R 7      pVP	                  V P
                  RR7      VP	                  V P
                  RR7      3# )r   start)rQ   end)r   getattr_abbrevr   rW   r)   )rG   r   r   r)   ivs   &&&  r1   _parsed_string_to_bounds$PeriodIndex._parsed_string_to_bounds  sW    '++D,<,<d>N>NOF&		$))	1299TYYE93RSSr3   c                    V ^8  d   QhRRRR/# )r<   periodsr   r=   r   r>   )r?   s   "r1   r@   rA     s      S D r3   c                	^    Ve#   \        R\        V 4      P                   R24      hW,           # )Nz%`freq` argument is not supported for z.shift)r   rX   __name__)rG   r   r)   s   &&&r1   shiftPeriodIndex.shift  s6    7T
8K8K7LFS  ~r3   r>   )NE)Nr   NNNNN)r   N)*r   
__module____qualname____firstlineno____doc___typ__annotations__r   	_data_cls!_supports_partial_string_indexingpropertyrH   r   rL   r   rW   _shared_doc_kwargsr^   rf   fgetrk   rp   ry   classmethodr   r   r0   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes____classcell__)r   s   @r1   r8   r8   R   sq   L\ D
I(,%% % * * 	" ! 	;; 		!	!"> #> 				B   B 			 	 !D " D 			 	 !D " D!;F <$ <$ 	<$
 <$ <$ <$ <$ <$ <$ <$|  04  0  0J . . 0D#. . 
< 
<  <.|  			6	67< 8<T
 			$	$% &r3   r8   c               $    V ^8  d   QhRRRRRR/# )r<   r   z
int | NonerV   rs   r=   r8   r>   )r?   s   "r1   r@   r@   &  s/     N4 N4 N4
 N4 N4r3   c                .   \         P                  ! WV4      ^8w  d   \        R4      hVf/   \        V \        4      '       g   \        V\        4      '       g   Rp\
        P                  ! WW#4      w  rS\        V4      p\        WVR7      p\        WTRR7      # )a-  
Return a fixed frequency PeriodIndex.

The day (calendar) is the default frequency.

Parameters
----------
start : str, datetime, date, pandas.Timestamp, or period-like, default None
    Left bound for generating periods.
end : str, datetime, date, pandas.Timestamp, or period-like, default None
    Right bound for generating periods.
periods : int, default None
    Number of periods to generate.
freq : str or DateOffset, optional
    Frequency alias. By default the freq is taken from `start` or `end`
    if those are Period objects. Otherwise, the default is ``"D"`` for
    daily frequency.
name : str, default None
    Name of the resulting PeriodIndex.

Returns
-------
PeriodIndex
    A PeriodIndex of fixed frequency periods.

See Also
--------
date_range : Returns a fixed frequency DatetimeIndex.
Period : Represents a period of time.
PeriodIndex : Immutable ndarray holding ordinal values indicating regular periods
    in time.

Notes
-----
Of the three parameters: ``start``, ``end``, and ``periods``, exactly two
must be specified.

To learn more about the frequency strings, please see
:ref:`this link<timeseries.offset_aliases>`.

Examples
--------
>>> pd.period_range(start="2017-01-01", end="2018-01-01", freq="M")
PeriodIndex(['2017-01', '2017-02', '2017-03', '2017-04', '2017-05', '2017-06',
         '2017-07', '2017-08', '2017-09', '2017-10', '2017-11', '2017-12',
         '2018-01'],
        dtype='period[M]')

If ``start`` or ``end`` are ``Period`` objects, they will be used as anchor
endpoints for a ``PeriodIndex`` with frequency matching that of the
``period_range`` constructor.

>>> pd.period_range(
...     start=pd.Period("2017Q1", freq="Q"),
...     end=pd.Period("2017Q2", freq="Q"),
...     freq="M",
... )
PeriodIndex(['2017-03', '2017-04', '2017-05', '2017-06'],
            dtype='period[M]')
zOOf the three parameters: start, end, and periods, exactly two must be specifiedDr*   Frd   )	comcount_not_noner   rv   r   r   _generate_ranger   r8   )r   r   r   r)   rV   r'   r+   s   &&&&&  r1   period_ranger  %  s    H %g.!3,
 	
 |Zv66z#v?V?V,,UGJDEt)DtU33r3   )strftime
start_timeend_timer   )D
__future__r   r   r   typingr   r   numpyr   pandas._libsr   rD   pandas._libs.tslibsr	   r
   r   r   r   r   pandas._libs.tslibs.dtypesr   pandas.util._decoratorsr   r   r   pandas.core.dtypes.commonr   pandas.core.dtypes.dtypesr   pandas.core.dtypes.genericr   pandas.core.dtypes.missingr   pandas.core.arrays.periodr   r   r   r   pandas.core.commoncorecommonr  pandas.core.indexes.baseindexesr   ibaser    pandas.core.indexes.datetimeliker   pandas.core.indexes.datetimesr   r   pandas.core.indexes.extensionr   collections.abcr    pandas._typingr!   r"   r#   dict_index_doc_kwargsupdater   r2   
_field_opsr8   r  r>   r3   r1   <module>r$     s(   "
  *  @  1 1 0 <  !   ( ( 7 B 8(  001    .*JK L] 	  CK,B,BC	
 -HI' I  .IX HN4 N4r3   