+
    xȇi|                     a  0 t $ ^ RIHt ^ RIHtHt ^ RIHt ^ RIt^ RIH	t	H
t
HtHtHtHtHtHtHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtHt ^ R	IHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/ ^ R
I0H1t1H2t2 ^ RI3H4t4 ^ RI5H6t6 ^ RI7H8t8 ^ RI9H:t:H;t;H<t<H=t=H>t>H?t?H@t@HAtAHBtBHCtCHDtDHEtEHFtFHGtGHHtHHItI ^ RIJHKtL ^ RIMHNtNHOtOHPtP ^ RIQHRtR ^ RISHTtT ^ RIUHVtV ^ RIWHXtXHYtYHZtZH[t[H\t\H]t] ^ RI^H_t_H`t`HataHbtbHctc ^ RIdHeteHftf ^ RIgHhthHiti ^ RIjHktkHltlHmtmHntn ^ RIoHptpHqtqHrtr ^ RIsHttt ^ RIuHvtv ^ RIwHxtxHyty ^ RIzH{t{ ^ RI|H}t} ^ RI~Ht ^ RIHu Ht ^ R IHtHtHt ^ R!IHtHt ^ R"IHt ^ R#IHtHt ^ R$IHt ]	'       d!   ^ R%IHtHtHt ^ R&I9Ht ^ R'IHt ^ R(IHtHtHt ]<]!,          tR)]R*&   R+ R, ltR- R. lt ! R/ R0]v]x4      t ! R1 R2]4      t ! R3 R4]4      tR5 R6 lt]R7 R8 l4       t]R9 R: l4       tR; R< ltR= R> ltR? R@ ltR# )A    )annotations)datetime	timedelta)wrapsN)	TYPE_CHECKINGAnyLiteralSelf	TypeAliasUnioncastfinaloverload)using_string_dtype)
get_option)algoslib)
BaseOffsetDayIncompatibleFrequencyNaTNaTTypePeriod
ResolutionTick	Timedelta	Timestampadd_overflowsafeastype_overflowsafeget_unit_from_dtypeiNaTints_to_pydatetimeints_to_pytimedeltaperiods_per_day	timezones	to_offset)RoundToround_nsint64)compare_mismatched_resolutions)get_unit_for_round)integer_op_not_supported)	ArrayLikeAxisIntDatetimeLikeScalarDtypeDtypeObjFInterpolateOptionsNpDtypePositionalIndexer2DPositionalIndexerTupleScalarIndexerSequenceIndexerTakeIndexerTimeAmbiguousTimeNonexistentnpt)function)AbstractMethodErrorInvalidComparisonPerformanceWarning)cache_readonly)find_stack_level)'construct_1d_object_array_from_listlike)is_all_stringsis_integer_dtypeis_list_likeis_object_dtypeis_string_dtypepandas_dtype)
ArrowDtypeCategoricalDtypeDatetimeTZDtypeExtensionDtypePeriodDtype)ABCCategoricalABCMultiIndex)is_valid_na_for_dtypeisna)
algorithmsmissingnanopsops)isin	map_arrayunique1d)datetimelike_accumulations)OpsMixin)NDArrayBackedExtensionArrayravel_compat)ArrowExtensionArray)ExtensionArray)IntegerArray)arrayensure_wrapped_if_datetimelikeextract_array)check_array_indexercheck_setitem_lengths)unpack_zerodim_and_defer)invalid_comparisonmake_invalid_op)frequencies)CallableIteratorSequence)TimeUnitIndex)DatetimeArrayPeriodArrayTimedeltaArrayr   DTScalarOrNaTc                   V ^8  d   QhRR/# )   op_namestr )formats   "o/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/core/arrays/datetimelike.py__annotate__rz      s     1 1s 1    c                :    \        V 4      p\        V 4      ! V4      # N)rg   re   )ru   ops   & ry   _make_unpacked_invalid_opr      s    		!B#G,R00r{   c                    V ^8  d   QhRRRR/# )rt   methr1   returnrw   )rx   s   "ry   rz   rz      s      1  r{   c                L   a  \        S 4      V 3R l4       p\        \        V4      # )z
For PeriodArray methods, dispatch to DatetimeArray and re-wrap the results
in PeriodArray.  We cannot use ._ndarray directly for the affected
methods because the i8 data has different semantics on NaT values.
c                \  < \        V P                  \        4      '       g   S! V .VO5/ VB # V P                  R 4      pS! V.VO5/ VB pV\        J d   \        # \        V\
        4      '       d   V P                  VP                  4      # VP                  R4      pV P                  V4      # )M8[ns]i8)	
isinstancedtyperM   viewr   r   	_box_func_value_from_backing_data)selfargskwargsarrresultres_i8r   s   &*,   ry   new_meth"_period_dispatch.<locals>.new_meth   s    $**k22.t.v..ii!c+D+F+S=J	**>>&--00T"&&v..r{   )r   r   r1   )r   r   s   f ry   _period_dispatchr      s*     4[/ / 8r{   c                    a  ] tR t^t$ RtR]R&   R]R&   R]R&   R]R	&   R
]R&   ]R R l4       tRR R llt]	R R l4       t
R R ltR R ltR R ltR tR R ltR R lt]	R R  l4       tR!R"R#R/R$ R% lltRR& R' lltRR( R) llt]R* R+ l4       t]R, R- l4       tR. V 3R/ lltR0 R1 ltR2 V 3R3 lltR4 R5 ltRR7 V 3R8 lllt]R9 R: l4       t]R; R< l4       t]R= R> l4       t]RR? R@ ll4       tRRA V 3RB llltRC V 3RD lltRE tRFRRGR6/RH RI lltRRJ RK lltRRL RM llt RN t!]"RO RP l4       t#]$RRQ RR ll4       t%RS RT lt&RU RV lt']	RW RX l4       t(]	RY RZ l4       t)]*R3R[ R\ llt+]	R] R^ l4       t,]	R_ R` l4       t-]	Ra Rb l4       t.]	Rc Rd l4       t/]	Re Rf l4       t0]	Rg Rh l4       t1]	Ri Rj l4       t2Rk t3]4! Rl4      t5]4! Rm4      t6]4! Rn4      t7]4! Ro4      t8]4! Rp4      t9]4! Rq4      t:]4! Rr4      t;]4! Rs4      t<]4! Rt4      t=]4! Ru4      t>]4! Rv4      t?]4! Rw4      t@]"Rx Ry l4       tA]"Rz R{ l4       tB]"R| R} l4       tC]"R~ R l4       tD]"R R l4       tE]"R R l4       tF]"R R l4       tG]"R R l4       tHR tIR tJR R ltK]"R R l4       tL]"R R l4       tM]"R R l4       tN]"R R l4       tO]"R R l4       tPRR6/R R lltQ]R! R4      R 4       tSR tT]R! R4      R 4       tUR tVR R ltWR R ltX]YR V 3R ll4       tZ]YRRRR6/R R ll4       t[]YRRRR6/R R ll4       t\RR6R^ /R R llt]]YRRRR6/R R ll4       t^RR R llt_R R lt`RtaV ;tb# )DatetimeLikeArrayMixinz
Shared Base/Mixin class for DatetimeArray, TimedeltaArray, PeriodArray

Assumes that __new__/__init__ defines:
    _ndarray

and that inheriting subclass implements:
    freq
ztuple[str, ...]_infer_matcheszCallable[[DtypeObj], bool]_is_recognized_dtypeztuple[type, ...]_recognized_scalars
np.ndarray_ndarrayBaseOffset | Nonefreqc                   V ^8  d   QhRR/# rt   r   boolrw   )rx   s   "ry   rz   #DatetimeLikeArrayMixin.__annotate__   s      d r{   c                	    R # Trw   r   s   &ry   _can_hold_na#DatetimeLikeArrayMixin._can_hold_na   s    r{   NFc               $    V ^8  d   QhRRRRRR/# )rt   r   Dtype | Nonecopyr   r   Nonerw   )rx   s   "ry   rz   r      s$     ( ('(AE(	(r{   c                	    \        V 4      hr}   r=   )r   datar   r   r   s   &&&&&ry   __init__DatetimeLikeArrayMixin.__init__   s     "$''r{   c                   V ^8  d   QhRR/# )rt   r   ztype[DatetimeLikeScalar]rw   )rx   s   "ry   rz   r      s     ( (6 (r{   c                    \        V 4      h)z{
The scalar associated with this datelike

* PeriodArray : Period
* DatetimeArray : Timestamp
* TimedeltaArray : Timedelta
r   r   s   &ry   _scalar_type#DatetimeLikeArrayMixin._scalar_type   s     "$''r{   c                    V ^8  d   QhRRRR/# )rt   valuerv   r   rr   rw   )rx   s   "ry   rz   r      s     ( ( ( (r{   c                    \        V 4      h)a  
Construct a scalar type from a string.

Parameters
----------
value : str

Returns
-------
Period, Timestamp, or Timedelta, or NaT
    Whatever the type of ``self._scalar_type`` is.

Notes
-----
This should call ``self._check_compatible_with`` before
unboxing the result.
r   r   r   s   &&ry   _scalar_from_string*DatetimeLikeArrayMixin._scalar_from_string       $ "$''r{   c                    V ^8  d   QhRRRR/# )rt   r   rr   r   z)np.int64 | np.datetime64 | np.timedelta64rw   )rx   s   "ry   rz   r     s     ( ("(	2(r{   c                    \        V 4      h)aA  
Unbox the integer value of a scalar `value`.

Parameters
----------
value : Period, Timestamp, Timedelta, or NaT
    Depending on subclass.

Returns
-------
int

Examples
--------
>>> arr = pd.array(np.array(["1970-01-01"], "datetime64[ns]"))
>>> arr._unbox_scalar(arr[0])
np.datetime64('1970-01-01T00:00:00.000000000')
r   r   s   &&ry   _unbox_scalar$DatetimeLikeArrayMixin._unbox_scalar  s    * "$''r{   c                    V ^8  d   QhRRRR/# )rt   otherrr   r   r   rw   )rx   s   "ry   rz   r     s     ( (M (d (r{   c                    \        V 4      h)a  
Verify that `self` and `other` are compatible.

* DatetimeArray verifies that the timezones (if any) match
* PeriodArray verifies that the freq matches
* Timedelta has no verification

In each case, NaT is considered compatible.

Parameters
----------
other

Raises
------
Exception
r   r   r   s   &&ry   _check_compatible_with-DatetimeLikeArrayMixin._check_compatible_with  r   r{   c                    \        V 4      h)z9
box function to get object from internal representation
r   )r   xs   &&ry   r    DatetimeLikeArrayMixin._box_func/  s     "$''r{   c                   V ^8  d   QhRR/# rt   r   r   rw   )rx   s   "ry   rz   r   5  s     D DZ Dr{   c                F    \         P                  ! WP                  RR7      # )z!
apply box func to passed values
F)convert)r   	map_inferr   r   valuess   &&ry   _box_values"DatetimeLikeArrayMixin._box_values5  s     }}V^^UCCr{   c                   V ^8  d   QhRR/# )rt   r   rj   rw   )rx   s   "ry   rz   r   ;  s     : :( :r{   c                	   a  S P                   ^8  d   V 3R l\        \        S 4      4       4       # V 3R lS P                   4       # )   c              3  6   <"   T F  pSV,          x  K  	  R # 5ir}   rw   ).0nr   s   & ry   	<genexpr>2DatetimeLikeArrayMixin.__iter__.<locals>.<genexpr>=  s     6%5DGG%5s   c              3  F   <"   T F  pSP                  V4      x  K  	  R # 5ir}   )r   )r   vr   s   & ry   r   r   ?  s     9y!DNN1%%ys   !)ndimrangelenasi8r   s   fry   __iter__DatetimeLikeArrayMixin.__iter__;  s1    99q=6U3t9%5669tyy99r{   c                   V ^8  d   QhRR/# )rt   r   znpt.NDArray[np.int64]rw   )rx   s   "ry   rz   r   B  s     
( 
(+ 
(r{   c                8    V P                   P                  R4      # )za
Integer representation of the values.

Returns
-------
ndarray
    An ndarray with int64 dtype.
r   )r   r   r   s   &ry   r   DatetimeLikeArrayMixin.asi8A  s     }}!!$''r{   na_repr   date_formatc                    V ^8  d   QhRRRR/# )rt   r   zstr | floatr   npt.NDArray[np.object_]rw   )rx   s   "ry   rz   r   Q  s     
( 
($
(	 
(r{   c                   \        V 4      h)zT
Helper method for astype when converting to strings.

Returns
-------
ndarray[str]
r   )r   r   r   s   &$$ry   _format_native_types+DatetimeLikeArrayMixin._format_native_typesQ  s     "$''r{   c                    V ^8  d   QhRRRR/# )rt   boxedr   r   zCallable[[object], str]rw   )rx   s   "ry   rz   r   ]  s       1H r{   c                	    R P                   # )z'{}')rx   )r   r   s   &&ry   
_formatter!DatetimeLikeArrayMixin._formatter]  s    }}r{   c               $    V ^8  d   QhRRRRRR/# )rt   r   zNpDtype | Noner   zbool | Noner   r   rw   )rx   s   "ry   rz   r   d  s$      #2=	r{   c                	b   \        V4      '       d7   VR J d   \        R4      h\        P                  ! \	        V 4      \
        R7      # VRJ d#   \        P                  ! V P                  VR7      # V P                  pV P                  '       d"   VP                  4       pR VP                  n
        V# )Fz:Unable to avoid copy while creating an array as requested.r   T)rF   
ValueErrornpr`   listobjectr   	_readonlyr   flags	writeable)r   r   r   r   s   &&& ry   	__array__ DatetimeLikeArrayMixin.__array__d  s     5!!u} P  88DJf554<88DMM77>>>[[]F%*FLL"r{   c                    V ^8  d   QhRRRR/# )rt   keyr6   r   rr   rw   )rx   s   "ry   rz   r   y  s    CC}CCr{   c                	    R # r}   rw   r   r   s   &&ry   __getitem__"DatetimeLikeArrayMixin.__getitem__x      @Cr{   c                    V ^8  d   QhRRRR/# )rt   r   z(SequenceIndexer | PositionalIndexerTupler   r
   rw   )rx   s   "ry   rz   r   |  s      5 
r{   c                	    R # r}   rw   r   s   &&ry   r  r  {  s     r{   c                    V ^8  d   QhRRRR/# )rt   r   r4   r   zSelf | DTScalarOrNaTrw   )rx   s   "ry   rz   r     s      2 7K r{   c                   < \        \        \        \        3,          \        SV `  V4      4      p\        P                  ! V4      '       d   V# \        \        V4      pV P                  V4      Vn	        V# )zz
This getitem defers to the underlying array, which by-definition can
only handle list-likes, slices, and integer scalars
)
r   r   r
   rr   superr  r   	is_scalar_get_getitem_freq_freq)r   r   r   	__class__s   && ry   r  r    s`     eD-/0%'2Ec2JK==  M $'F --c2r{   c                   V ^8  d   QhRR/# rt   r   r   rw   )rx   s   "ry   rz   r     s      (9 r{   c                   \        V P                  \        4      pV'       d   V P                  pV# V P                  ^8w  d   RpV# \        W4      pRp\        V\        4      '       dK   V P                  e.   VP                  e    VP                  V P                  ,          pV# V P                  p V# V\        J d   V P                  pV# \        P                  ! V4      '       d[   \        P                  ! VP                  \        P                  4      4      p\        V\        4      '       d   V P!                  V4      # V# )zL
Find the `freq` attribute to assign to the result of a __getitem__ lookup.
N)r   r   rM   r   r   rc   slicestepEllipsiscomis_bool_indexerr   maybe_booleans_to_slicer   r   uint8r
  )r   r   	is_periodr   new_keys   &&   ry   r
  (DatetimeLikeArrayMixin._get_getitem_freq  s
    tzz;7	99D& % YY!^D"  &d0CD#u%%99(SXX-A88dii/D   99D   yy
 	 $$S))55chhrxx6HIgu--11'::r{   c               $    V ^8  d   QhRRRRRR/# )rt   r   z,int | Sequence[int] | Sequence[bool] | slicer   zNaTType | Any | Sequence[Any]r   r   rw   )rx   s   "ry   rz   r     s(     ! !9! -! 
	!r{   c                	r   < \        WV 4      p\        SV `	  W4       V'       d   R # V P                  4        R # r}   )rd   r  __setitem___maybe_clear_freq)r   r   r   no_opr  s   &&& ry   r  "DatetimeLikeArrayMixin.__setitem__  s2     &c$7 	C' r{   c                   V ^8  d   QhRR/# rt   r   r   rw   )rx   s   "ry   rz   r     s      4 r{   c                	    R # r}   rw   r   s   &ry   r  (DatetimeLikeArrayMixin._maybe_clear_freq  s     	r{   Tc                   V ^8  d   QhRR/# )rt   r   r   rw   )rx   s   "ry   rz   r     s     71 71$ 71r{   c                	  < \        V4      pV\        8X  d   V P                  P                  R 8X  d>   \	        RV 4      p V P
                  p\        VV P                  RV P                  R7      pV# V P                  P                  R8X  d   \        V P                  RR7      # V P                  V P
                  P                  4       4      P                  V P                  4      # \        V4      '       df   \!        V\"        4      '       d@   V P%                  VP&                  R7      pVP)                  4       pVP+                  WQRR	7      # V P%                  4       # \!        V\"        4      '       d   \,        S	V `]  WR
7      # VP                  R9   dX   V P
                  pV\0        P2                  8w  d   \5        RV P                   RV R24      hV'       d   VP7                  4       pV# VP                  R9   d   V P                  V8w  g   VP                  R8X  d'   R\9        V 4      P:                   RV 2p\5        V4      h\0        P<                  ! WR7      # )Mro   	timestamp)tzboxresomT)r)  )r   F)r   r   r   iuzConverting from z to z? is not supported. Do obj.astype('int64').astype(dtype) insteadmMfzCannot cast z
 to dtype r   )rH   r   r   kindr   r   r"   r(  _cresor#   r   r   ravelreshapeshaperG   r   rL   r   na_valueconstruct_array_type_from_sequencer  astyper   int64	TypeErrorr   type__name__asarray)
r   r   r   i8data	converted
arr_objectclsr   msgr  s
   &&&      ry   r8  DatetimeLikeArrayMixin.astype  s   
 U#F?zz#%OT2 .ww#		 ! C'*4==dCC##DIIOO$56>>tzzJJU##%00!66enn6M
002))*)NN0022~..7>%>33ZZ4 YYF &tzzl$ug >C C 
 MjjD TZZ5%8UZZ3=N !d!4!4 5ZwGCC. ::d00r{   c                   V ^8  d   QhRR/# rt   r   r
   rw   )rx   s   "ry   rz   r     s    dr{   c                	    R # r}   rw   r   s   &ry   r   DatetimeLikeArrayMixin.view  s    r{   c                    V ^8  d   QhRRRR/# )rt   r   zLiteral['M8[ns]']r   ro   rw   )rx   s   "ry   rz   r   
  s    BB+BBr{   c                	    R # r}   rw   r   r   s   &&ry   r   rG  	  s    ?Br{   c                    V ^8  d   QhRRRR/# )rt   r   zLiteral['m8[ns]']r   rq   rw   )rx   s   "ry   rz   r     s    CC+CCr{   c                	    R # r}   rw   rJ  s   &&ry   r   rG    r  r{   c                    V ^8  d   QhRRRR/# rt   r   r   r   r,   rw   )rx   s   "ry   rz   r     s    ??,??r{   c                	    R # r}   rw   rJ  s   &&ry   r   rG    s    <?r{   c                    V ^8  d   QhRRRR/# rN  rw   )rx   s   "ry   rz   r     s     # #, #) #r{   c                	"   < \         SV `  V4      # r}   )r  r   )r   r   r  s   &&ry   r   rG    s     w|E""r{   c                    V ^8  d   QhRRRR/# )rt   masknpt.NDArray[np.bool_]r   r   rw   )rx   s   "ry   rz   r     s      2 d r{   c                	4   < \         SV `  W4       R V n        R # r}   )r  _putmaskr  )r   rS  r   r  s   &&&ry   rV  DatetimeLikeArrayMixin._putmask  s    %
r{   c                	   \        V\        4      '       d    V P                  V4      p\        WP                  4      '       g   V\        J d&   V P                  V4      p V P                  V4       V# \        V4      '       g   \        V4      h\        V4      \        V 4      8w  d   \        R4      h V P                  VRR7      pV P                  V4       V#   \        \        3 d   p\        T4      ThR p?ii ; i  \         d   p\        T4      ThR p?ii ; i  \         d4   p\        \        TRR 4      4      '       d    R p?T# \        T4      ThR p?ii ; i)NzLengths must matchT)allow_objectr   )r   rv   r   r   r   r>   r   r   r   r   r:  rE   r   _validate_listlikerF   getattr)r   r   errs   && ry   _validate_comparison_value1DatetimeLikeArrayMixin._validate_comparison_value  sK   eS!!8007
 e5566%3,%%e,E8++E2, # e$$#E**Z3t9$122<//D/I++E2 ;  56 8'.C78  8'.C78  <"75'4#@AA  ,E2;<sM   C  C? 4$D C<+C77C<?D
DDE)EEEallow_listlikeunboxc                    V ^8  d   QhRRRR/# )rt   r_  r   r`  rw   )rx   s   "ry   rz   r   C  s      ;) ;) 	;)
 ;)r{   c               R   \        WP                  4      '       d   M\        V\        4      '       d    V P                  V4      pM\        WP                  4      '       d   \        pMv\        V4      '       d   V P                  W4      p\        V4      h\        WP                  4      '       d   V P                  V4      pMV P                  W4      p\        V4      hV'       g   V# V P                  V4      #   \         d#   pT P                  Y4      p\        T4      ThRp?ii ; i)a  
Validate that the input value can be cast to our scalar_type.

Parameters
----------
value : object
allow_listlike: bool, default False
    When raising an exception, whether the message should say
    listlike inputs are allowed.
unbox : bool, default True
    Whether to unbox the result before returning.  Note: unbox=False
    skips the setitem compatibility check.

Returns
-------
self._scalar_type or NaT
N)r   r   rv   r   r   _validation_error_messager:  rP   r   r   rQ   r   r   )r   r   r_  r`  r\  rB  s   &&$$  ry   _validate_scalar'DatetimeLikeArrayMixin._validate_scalarC  s    0 e..//s##.007
 #5**55E%[[ 00GCC. 7788 %%e,E 00GCC.  L!!%((9  .44UKn#-.s   C9 9D&D!!D&c                    V ^8  d   QhRRRR/# )rt   r_  r   r   rv   rw   )rx   s   "ry   rz   r     s      t PS r{   c                (   \        VR4      '       d#   \        VR^ 4      ^ 8  d   VP                   R2pMR\        V4      P                   R2pV'       d    RV P
                  P                   RV R2pV# RV P
                  P                   RV R2pV# )	z
Construct an exception message on validation error.

Some methods allow only scalar inputs, while others allow either scalar
or listlike.

Parameters
----------
allow_listlike: bool, default False

Returns
-------
str
r   r   z array'zvalue should be a 'z!', 'NaT', or array of those. Got z	 instead.z' or 'NaT'. Got )hasattrr[  r   r;  r<  r   )r   r   r_  msg_gotrB  s   &&&  ry   rc  0DatetimeLikeArrayMixin._validation_error_message  s     5'""wufa'@1'DV,G$u+../q1G%d&7&7&@&@%A B**1)=  
 &d&7&7&@&@%A Biy*  
r{   c                   V ^8  d   QhRR/# )rt   rY  r   rw   )rx   s   "ry   rz   r     s     @ @d @r{   c                	   \        V\        V 4      4      '       d^   V P                  P                  R 9   dA   V'       g9   V P                  VP                  8w  d   VP                  V P                  RR7      pV# \        V\        4      '       d7   \        V4      ^ 8X  d'   \        V 4      P                  . V P                  R7      # \        VR4      '       dV   VP                  \        8X  dA   \        P                  ! V4      V P                  9   d    \        V 4      P                  V4      p\        V\        4      '       d   \#        V4      p\        V\$        P&                  4      '       d9   VP                  \        8X  d$   \        P(                  ! VRV P                  R7      p\+        VRR7      p\-        V4      p\+        VRR7      p\/        V4      '       d'    \        V 4      P                  WP                  R7      p\        VP                  \0        4      '       dC   VP2                  P                  V P                  8X  d   VP5                  4       p\+        VRR7      pV'       d   \7        VP                  4      '       d   MG\        V 4      P9                  VP                  4      '       g   V P!                  VR4      p\        V4      hV P                  P                  R 9   d&   V'       g   VP                  V P                  RR7      pV#   \        \        3 d3   pT'       d   Tu Rp?# T P!                  TR4      p\        T4      ThRp?ii ; i  \         d     ELci ; i)	r.  Fround_okr   r   NTconvert_non_numericdtype_if_all_natextract_numpy)r   r;  r   r0  unitas_unitr   r   r7  ri  r   r   infer_dtyper   r   r:  rc  rB   r   ndarraymaybe_convert_objectsrb   pd_arrayrC   rJ   
categories_internal_get_valuesrF   r   )r   r   rY  r\  rB  s   &&&  ry   rZ  )DatetimeLikeArrayMixin._validate_listlike  s}   eT$Z((zz$&|		UZZ@Wdii%@LeT""s5zQ:,,Rtzz,BB5'""u{{f'< u%)<)<<2 J55e<E eT"";EBEeRZZ((U[[F-B --4$**E e48e48%   T
11%zz1J ekk#344%%3224%e4@OEKK88d00==00=CC. ::??d"<MM$))eM<E_ #I. 2#$88EC#C.c1	26  s6   L %M M!	M*M0MMM%$M%c                	    \        V4      '       d   V P                  V4      pMV P                  VR R7      # V P                  V4      # )T)r_  )rE   rZ  rd  _unboxr   s   &&ry   _validate_setitem_value.DatetimeLikeArrayMixin._validate_setitem_value  sB    ++E2E((t(DD{{5!!r{   c                   V ^8  d   QhRR/# )rt   r   z6np.int64 | np.datetime64 | np.timedelta64 | np.ndarrayrw   )rx   s   "ry   rz   r     s     
 
U 
r{   c                    \         P                  ! V4      '       d   V P                  V4      pV# V P                  V4       VP                  pV# )zJ
Unbox either a scalar with _unbox_scalar or an instance of our own type.
)r   r	  r   r   r   r   s   &&ry   r  DatetimeLikeArrayMixin._unbox  sH    
 ==&&u-E
  ''.NNEr{   c                   V ^8  d   QhRR/# )rt   	na_actionzLiteral['ignore'] | Nonerw   )rx   s   "ry   rz   r     s     	  	 %= 	 r{   c                	    ^ RI Hp \        WVR7      pV! V4      p\        V\        4      '       d   VP                  4       # VP                  # )r   rm   )r  )pandasrn   rW   r   rO   to_numpyr`   )r   mapperr  rn   r   s   &&&  ry   mapDatetimeLikeArrayMixin.map  s>     49=vfm,,??$$<<r{   c                    V ^8  d   QhRRRR/# )rt   r   r,   r   rT  rw   )rx   s   "ry   rz   r     s     2, 2,9 2,)> 2,r{   c                x   VP                   P                  R9   d'   \        P                  ! V P                  \
        R7      # \        V4      p\        V\        V 4      4      '       g   VP                   \        8X  di   \        P                  ! VRV P                   R7      pVP                   \        8w  d   V P                  V4      # \        V P                  \        4      V4      # \        P                  ! V P                  \
        R7      # V P                   P                  R9   d(   \        RV 4      p VP                  V P                   4      p V P#                  V4       \        T P(                  TP(                  4      #   \$        \&        3 d*    \        P                  ! T P                  \
        R7      u # i ; i)z
Compute boolean array of whether each value is found in the
passed set of values.

Parameters
----------
values : np.ndarray or ExtensionArray

Returns
-------
ndarray[bool]
fiucr   Trp  r.  DatetimeArray | TimedeltaArray)r   r0  r   zerosr4  r   ra   r   r;  r   r   ry  rV   r8  r   rv  ru  r   r:  r   r   r   s   &&ry   rV   DatetimeLikeArrayMixin.isin  s?    <<&88DJJd33/7&$t*--||v%22(,%)ZZ
 <<6)99V,,  F 3V<<88DJJd33::??d"8$?D^^DII.F	4 ''/ DIIv{{++ :& 	488DJJd33	4s   E? ?7F98F9c                   V ^8  d   QhRR/# rt   r   rT  rw   )rx   s   "ry   rz   r   >  s      + r{   c                	    V P                   # r}   )_isnanr   s   &ry   rQ   DatetimeLikeArrayMixin.isna>  s    {{r{   c                   V ^8  d   QhRR/# r  rw   )rx   s   "ry   rz   r   B  s     ! !- !r{   c                (    V P                   \        8H  # )z
return if each value is nan
)r   r!   r   s   &ry   r  DatetimeLikeArrayMixin._isnanA  s    
 yyD  r{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r   I  s     ' ' 'r{   c                H    \        V P                  P                  4       4      # )z:
return if I have any nans; enables various perf speedups
)r   r  anyr   s   &ry   _hasnaDatetimeLikeArrayMixin._hasnaH  s    
 DKKOO%&&r{   c                    V ^8  d   QhRRRR/# )rt   r   r   r   rw   )rx   s   "ry   rz   r   O  s       	r{   c                    V P                   '       dO   V'       d   VP                  V4      pVf   \        P                  p\        P                  ! WP
                  V4       V# )a  
Parameters
----------
result : np.ndarray
fill_value : object, default iNaT
convert : str, dtype or None

Returns
-------
result : ndarray with values replace by the fill_value

mask the result if needed, convert to the provided dtype if its not
None

This is an internal routine.
)r  r8  r   nanputmaskr  )r   r   
fill_valuer   s   &&&&ry   _maybe_mask_results*DatetimeLikeArrayMixin._maybe_mask_resultsO  sD    & ;;;w/!VV
JJv{{J7r{   c                   V ^8  d   QhRR/# rt   r   z
str | Nonerw   )rx   s   "ry   rz   r   n  s     !! !! !!r{   c                N    V P                   f   R# V P                   P                  # )a^  
Return the frequency object as a string if it's set, otherwise None.

See Also
--------
DatetimeIndex.inferred_freq : Returns a string representing a frequency
    generated by infer_freq.

Examples
--------
For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00"], freq="D")
>>> idx.freqstr
'D'

The frequency can be inferred if there are more than 2 points:

>>> idx = pd.DatetimeIndex(
...     ["2018-01-01", "2018-01-03", "2018-01-05"], freq="infer"
... )
>>> idx.freqstr
'2D'

For PeriodIndex:

>>> idx = pd.PeriodIndex(["2023-1", "2023-2", "2023-3"], freq="M")
>>> idx.freqstr
'M'
N)r   freqstrr   s   &ry   r  DatetimeLikeArrayMixin.freqstrm  s"    @ 99yy   r{   c                   V ^8  d   QhRR/# r  rw   )rx   s   "ry   rz   r     s     ! !z !r{   c                z    V P                   ^8w  d   R#  \        P                  ! V 4      #   \         d     R# i ; i)al  
Tries to return a string representing a frequency generated by infer_freq.

Returns None if it can't autodetect the frequency.

See Also
--------
DatetimeIndex.freqstr : Return the frequency object as a string if it's set,
    otherwise None.

Examples
--------
For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["2018-01-01", "2018-01-03", "2018-01-05"])
>>> idx.inferred_freq
'2D'

For TimedeltaIndex:

>>> tdelta_idx = pd.to_timedelta(["0 days", "10 days", "20 days"])
>>> tdelta_idx
TimedeltaIndex(['0 days', '10 days', '20 days'],
               dtype='timedelta64[us]', freq=None)
>>> tdelta_idx.inferred_freq
'10D'
N)r   rh   
infer_freqr   r   s   &ry   inferred_freq$DatetimeLikeArrayMixin.inferred_freq  s:    : 99>	))$// 		s   + ::c                   V ^8  d   QhRR/# )rt   r   zResolution | Nonerw   )rx   s   "ry   rz   r     s      !2 r{   c                	x    V P                   pVf   R #  \        P                  ! V4      #   \         d     R # i ; ir}   )r  r   get_reso_from_freqstrKeyError)r   r  s   & ry   _resolution_obj&DatetimeLikeArrayMixin._resolution_obj  s;    ,,?	33G<< 		s   * 99c                   V ^8  d   QhRR/# )rt   r   rv   rw   )rx   s   "ry   rz   r     s     - -C -r{   c                .    V P                   P                  # )z?
Returns day, hour, minute, second, millisecond or microsecond
)r  attrnamer   s   &ry   
resolution!DatetimeLikeArrayMixin.resolution  s     ##,,,r{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r          ? ?$ ?r{   c                	T    \         P                  ! V P                  R R7      ^ ,          # T)timeliker   is_monotonicr   r   s   &ry   _is_monotonic_increasing/DatetimeLikeArrayMixin._is_monotonic_increasing      !!$))d;A>>r{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r     r  r{   c                	T    \         P                  ! V P                  R R7      ^,          # r  r  r   s   &ry   _is_monotonic_decreasing/DatetimeLikeArrayMixin._is_monotonic_decreasing  r  r{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r     s     @ @D @r{   c                	v    \        \        V P                  P                  R 4      4      4      V P                  8H  # )K)r   rX   r   r2  sizer   s   &ry   
_is_unique!DatetimeLikeArrayMixin._is_unique  s(    8DIIOOC012dii??r{   c                	b   V P                   ^8  d[   \        VRR4      V P                  8X  d?   V! V P                  4       VP                  4       4      P	                  V P                  4      #  V P                  V4      p\        TRR4      p\        T4      '       dB   \        P                  ! T\         P"                  ! T P%                  \&        4      4      T4      pT# T\(        J de   T\*        P,                  J d)   \         P.                  ! T P                  \0        R7      pT# \         P2                  ! T P                  \0        R7      pT# \        T P                  \4        4      '       g   \7        \8        T 4      p T P:                  TP:                  8w  d]   \        T\=        T 4      4      '       g     TP?                  T P@                  RR7      pM"TPJ                  p\I        T PJ                  YR4      # T PM                  T4      pT! T PJ                  PO                  R4      TPO                  R4      4      p\Q        T4      pT PR                  T,          pTPU                  4       '       d*   T\*        P,                  J p	\         PV                  ! YHT	4       T#   \         dJ    \        TR4      '       d)   \        TP                  \        4      '       d	   \        u # \        YT4      u # i ; i  \B         d:    \         PD                  ! TPF                  4      p\I        T PJ                  YR4      u # i ; i)r   r4  Nr   r   Frn  r   ),r   r[  r4  r2  r3  r]  r>   ri  r   r   rI   NotImplementedrf   rF   rU   comp_method_OBJECT_ARRAYr   r=  r8  r   r   operatorneonesr   r  rM   r   TimelikeOpsr1  r;  rv  ru  r   r`   asm8r)   r   r  r   rQ   r  r  r  )
r   r   r~   r   r   	other_arr
other_valso_maskrS  
nat_results
   &&&       ry   _cmp_method"DatetimeLikeArrayMixin._cmp_method  sX   99q=WUGT:djjHdjjlEKKM2::4::FF	733E:E w-5!! 11BJJt{{623UF MC<X[[ 48 M $**D9M$**k22T*D{{ell*!%d44 %dii% H !&I9$--WW[['
DMM&&t,jood.CDe{{V#88::x{{*JJJvZ0a ! 	7ug&&:ekk:+N+N%%%d266	7: & $&HHUZZ$8	= MM9  s,   -J 2K* AK'K'&K'*AL.-L.__pow____rpow____mul____rmul____truediv____rtruediv____floordiv____rfloordiv____mod____rmod__
__divmod____rdivmod__c                   V ^8  d   QhRR/# )rt   r   z@tuple[int | npt.NDArray[np.int64], None | npt.NDArray[np.bool_]]rw   )rx   s   "ry   rz   r   "  s      	Ir{   c                    \        V\        4      '       d   VP                  pRpW#3# \        V\        \        34      '       d   VP
                  pRpW#3# VP                  pVP                  pW#3# )z>
Get the int64 values and b_mask to pass to add_overflowsafe.
N)r   r   ordinalr   r   r   r  r   )r   r   i8valuesrS  s   &&  ry   _get_i8_values_and_mask.DatetimeLikeArrayMixin._get_i8_values_and_mask!  sq     eV$$}}HD ~ 	9566||HD
 ~ <<DzzH~r{   c                   V ^8  d   QhRR/# r  rw   )rx   s   "ry   rz   r   5  s     ' '4E 'r{   c                   \        V P                  \        4      '       d   V P                  # \        P
                  ! V4      '       g   R# \        V P                  \        4      '       d   V P                  # V P                  P                  R8X  d#   \        V\        4      '       d   V P                  # V P                  P                  R8X  dW   \        V\        4      '       dA   VP                  e'   \        P                  ! VP                  4      '       d   V P                  # \        P                  ! V P                  R4      '       dC   \        V P                  \        4      '       d#   \        V\        4      '       d   V P                  # \        P                  ! V P                  R4      '       dC   \        V\        4      '       d-   \        V P                  \        4      '       d   V P                  # R# )z@
Check if we can preserve self.freq in addition or subtraction.
Nr+  r&  )r   r   rM   r   r   r	  r   r0  r   r   r(  r%   is_utcis_np_dtyper   r   s   &&ry   _get_arithmetic_result_freq2DatetimeLikeArrayMixin._get_arithmetic_result_freq4  s8    djj+..99u%%		4((99ZZ__#
5)(D(D99JJOOs"5),,!Y%5%5ehh%?%?
 99OODJJ,,499c**5),, 99OODJJ,,5),,499c**99r{   c                   V ^8  d   QhRR/# )rt   r   ro   rw   )rx   s   "ry   rz   r   _  s     Q Q Qr{   c                	   \         P                  ! V P                  R 4      '       g8   \        R\	        V 4      P
                   R\	        V4      P
                   24      h\        RV 4      p ^ RIHp ^ RI	H
p V\        Jg   Q h\        V4      '       da   V P                  \        P                  ! 4       P                  RV P                    R24      ,           pVP"                  ! WDP                  R7      # \%        V4      pV P'                  V4      w  r\        RV 4      p V P)                  V4      w  rV\+        V P,                  \.        P0                  ! VR	R7      4      pVP3                  RV P                    R24      pV! VP4                  V P                   R
7      pVP3                  RV P                    R24      pV P7                  V4      p	VP"                  ! WxV	R7      # )r+  cannot add  and rq   ro   )tz_to_dtypezM8[]r   r   r(  ru  r   r   )r   r  r   r:  r;  r<  r   pandas.core.arraysro   pandas.core.arrays.datetimesr  r   rQ   r   to_datetime64r8  ru  _simple_newr   _ensure_matching_resosr  r   r   r   r=  r   r(  r  )
r   r   ro   r  r   other_i8r  
res_valuesr   new_freqs
   &&        ry   _add_datetimelike_scalar/DatetimeLikeArrayMixin._add_datetimelike_scalar^  s   tzz3//d4j112%U8L8L7MN  $d+4<C;; ]]S%6%6%8%?%?#dii[PQ@R%SSF ,,V<<HH% 11%8$d+77>!$))RZZ-MN[[3tyyk!34
uxxdii8[[3tyyk!34
33E:((xPPr{   c                    V ^8  d   QhRRRR/# )rt   r   ro   r   rw   )rx   s   "ry   rz   r     s      ] } r{   c                	    \         P                  ! V P                  R 4      '       g8   \        R\	        V 4      P
                   R\	        V4      P
                   24      hW,           # )r+  r  r  )r   r  r   r:  r;  r<  r   s   &&ry   _add_datetime_arraylike.DatetimeLikeArrayMixin._add_datetime_arraylike  sT    tzz3//d4j112%U8L8L7MN 
 |r{   c                    V ^8  d   QhRRRR/# )rt   r   zdatetime | np.datetime64r   rq   rw   )rx   s   "ry   rz   r     s     * *-*	*r{   c                	,   V P                   P                  R 8w  d"   \        R\        V 4      P                   24      h\        RV 4      p \        V4      '       d   V \        ,
          # \        V4      pV P                  V4      w  rV P                  V4      # )r&  "cannot subtract a datelike from a ro   )r   r0  r:  r;  r<  r   rQ   r   r   r  _sub_datetimelike)r   r   tss   && ry   _sub_datetimelike_scalar/DatetimeLikeArrayMixin._sub_datetimelike_scalar  s     ::??c!@dATAT@UVWWOT* ;;#:u..r2%%b))r{   c                    V ^8  d   QhRRRR/# )rt   r   ro   r   rq   rw   )rx   s   "ry   rz   r     s     
- 
-] 
-~ 
-r{   c                	"   V P                   P                  R 8w  d"   \        R\        V 4      P                   24      h\        V 4      \        V4      8w  d   \        R4      h\        RV 4      p V P                  V4      w  rV P                  V4      # )r&  r  $cannot add indices of unequal lengthro   )
r   r0  r:  r;  r<  r   r   r   r  r  r   s   &&ry   _sub_datetime_arraylike.DatetimeLikeArrayMixin._sub_datetime_arraylike  s{    ::??c!@dATAT@UVWWt9E
"CDDOT*11%8%%e,,r{   c                    V ^8  d   QhRRRR/# )rt   r   zTimestamp | DatetimeArrayr   rq   rw   )rx   s   "ry   rz   r     s     U U'@ U^ Ur{   c                	   \        R V 4      p ^ RIHp  V P                  V4       T P                  T4      w  rV\        T P                  \        P                  ! T) RR7      4      pTP                  RT P                   R24      pT P                  T4      p	\        R	T	4      p	TP                   ! YP"                  T	R
7      #   \         d3   p\        T4      P                  RR4      p\        T4      ! T4      ThRp?ii ; i)ro   rq   comparesubtractNr   r   timedelta64[r  zTick | Noner  )r   r  rq   _assert_tzawareness_compatr:  rv   replacer;  r  r   r   r   r=  r   ru  r  r  r   )
r   r   rq   r\  new_messager  r  r  res_m8r  s
   &&        ry   r  (DatetimeLikeArrayMixin._sub_datetimelike  s    OT*5	2++E2
  77>%diiXIT1RS
<		{!!<=33E:x0))&8TT  	2c(**9jAKs)K(c1	2s   B? ?C<
-C77C<c                    V ^8  d   QhRRRR/# )rt   r   r   r   rp   rw   )rx   s   "ry   rz   r     s     
 
 
K 
r{   c                	@   \         P                  ! V P                  R 4      '       g"   \        R\	        V 4      P
                   24      h^ RIHp \        P                  ! VP                  V P                  4      p\        VP                  4      pV! W4R7      pWP,           # )r+  zcannot add Period to a )rp   r   )r   r  r   r:  r;  r<  pandas.core.arrays.periodrp   r   broadcast_tor  r4  rM   r   )r   r   rp   i8valsr   parrs   &&    ry   _add_period"DatetimeLikeArrayMixin._add_period  sr    tzz3//5d4j6I6I5JKLL 	:

;EJJ'6/{r{   c                	    \        V 4      hr}   r   )r   offsets   &&ry   _add_offset"DatetimeLikeArrayMixin._add_offset  s    !$''r{   c                   \        V4      '       d   \        P                  ! V P                  RR7      P	                  V P
                  P                  4      pVP                  \        4       \        V 4      P                  W P                  R7      # \        RV 4      p \        V4      pV P                  V4      w  rV P                  V4      # )zC
Add a delta of a timedeltalike

Returns
-------
Same type as self
r   r   r  )rQ   r   emptyr4  r   r   r   fillr!   r;  r  r   r   r  _add_timedeltalike)r   r   
new_valuess   && ry   _add_timedeltalike_scalar0DatetimeLikeArrayMixin._add_timedeltalike_scalar  s     ;;$**D9>>t}}?R?RSJOOD!:))*JJ)GG 4d;% 11%8&&u--r{   c                    V ^8  d   QhRRRR/# )rt   r   rq   r   r
   rw   )rx   s   "ry   rz   r     s     . .n . .r{   c                    \        V 4      \        V4      8w  d   \        R4      h\        RV 4      P                  V4      w  rV P	                  V4      # )zD
Add a delta of a TimedeltaIndex

Returns
-------
Same type as self
r  r  )r   r   r   r  r3  r   s   &&ry   _add_timedelta_arraylike/DatetimeLikeArrayMixin._add_timedelta_arraylike  sR     t9E
"CDD,d

 
 
' 	 &&u--r{   c                    V ^8  d   QhRRRR/# )rt   r   zTimedelta | TimedeltaArrayr   r
   rw   )rx   s   "ry   rz   r     s     
 
(B 
t 
r{   c                	:   V P                  V4      w  r#\        V P                  \        P                  ! VR R7      4      pVP                  V P                  P                  4      pV P                  V4      p\        V 4      P                  VV P                  VR7      # )r   r   r  )r  r   r   r   r=  r   r   r   r  r;  r  )r   r   r  r  r4  r  r  s   &&     ry   r3  )DatetimeLikeArrayMixin._add_timedeltalike  s    77>%diiHD1QR
__T]]%8%89
33E: Dz%%** & 
 	
r{   c                   V ^8  d   QhRR/# rE  rw   )rx   s   "ry   rz   r     s     
 
$ 
r{   c                   \        V P                  \        4      '       d<   \        R\	        V 4      P
                   R\	        \        4      P
                   24      h\        P                  ! V P                  \        P                  R7      pVP                  \        4       VP                  V P                  P                  4      p\	        V 4      P                  VV P                  RR7      # )z
Add pd.NaT to self
zCannot add r  r   Nr  )r   r   rM   r:  r;  r<  r   r   r1  r4  r9  r2  r!   r   r   r  r   r   s   & ry   _add_natDatetimeLikeArrayMixin._add_nat  s    
 djj+..d4j112%S	8J8J7KL  $**BHH5DT]]001Dz%%** & 
 	
r{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r     s     2 2* 2r{   c                :   \         P                  ! V P                  \         P                  R7      pVP	                  \
        4       V P                  P                  R9   d,   \        RV 4      p VP                  RV P                   R24      # VP                  R4      # )z
Subtract pd.NaT from self
r   r.  zDatetimeArray| TimedeltaArrayr  r  ztimedelta64[ns])r   r1  r4  r9  r2  r!   r   r0  r   r   ru  r@  s   & ry   _sub_natDatetimeLikeArrayMixin._sub_nat  sq     $**BHH5D::??d"7>D;;dii[:;;;;011r{   c                    V ^8  d   QhRRRR/# )rt   r   zPeriod | PeriodArrayr   r   rw   )rx   s   "ry   rz   r   .  s      %9 >U r{   c                	P   \        V P                  \        4      '       g8   \        R \	        V4      P
                   R\	        V 4      P
                   24      h\        RV 4      p V P                  V4       V P                  V4      w  r#\        V P                  \        P                  ! V) RR7      4      p\        P                  ! V Uu. uF  qPP                  P                  V,          NK!  	  up4      pVf   V P                   pMV P                   V,          p\"        Wg&   V# u upi )cannot subtract  from rp   r   r   )r   r   rM   r:  r;  r<  r   r   r  r   r   r   r=  r`   r   baser  r   )r   r   r  r  new_i8_datar   new_datarS  s   &&      ry   _sub_periodlike&DatetimeLikeArrayMixin._sub_periodlike-  s     $**k22"4;#7#7"8tDz?R?R>ST  M4(##E*77>&tyy"**hYd2ST88EAYY^^a//EF>;;D ;;'D Fs   	%D#c                    V ^8  d   QhRRRR/# )rt   r   r   r   r   rw   )rx   s   "ry   rz   r   G  s     " "*A "* "r{   c                   V\         P                  \         P                  39   g   Q h\        V4      ^8X  d!   V P                  ^8X  d   V! W^ ,          4      # \        R4      '       d=   \        P                  ! R\        V 4      P                   R2\        \        4       R7       V P                  VP                  8X  g   Q V P                  VP                  34       hV! V P                  R4      \        P                  ! V4      4      pV# )a  
Add or subtract array-like of DateOffset objects

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

Returns
-------
np.ndarray[object]
    Except in fastpath case with length 1 where we operate on the
    contained scalar.
performance_warningsz)Adding/subtracting object-dtype array to z not vectorized.)
stacklevelO)r  addsubr   r   r   warningswarnr;  r<  r?   rA   r4  r8  r   r=  )r   r   r~   r  s   &&& ry   _addsub_object_array+DatetimeLikeArrayMixin._addsub_object_arrayF  s      hllHLL1111u:?tyyA~ d!H%%,--MM;:&&''79"+-	 zzU[[(C4::u{{*CC(C("**U*;<
r{   skipnac               $    V ^8  d   QhRRRRRR/# )rt   namerv   r[  r   r   r
   rw   )rx   s   "ry   rz   r   k  s&     @ @ @ @$ @r{   c               	    VR9  d   \        RV R\        V 4       24      h\        \        V4      pV! V P	                  4       3RV/VB p\        V 4      P                  WPP                  R7      # )cumminzAccumulation z not supported for r[  r   >   cummaxr_  )r:  r;  r[  rY   r   r  r   )r   r]  r[  r   r~   r   s   &&$,  ry   _accumulate"DatetimeLikeArrayMixin._accumulatek  sk    ++mD61DT$ZLQRR/6DIIK99&9Dz%%fJJ%??r{   __add__c                	   \        VR R4      p\        V4      pV\        J d   V P                  4       pEM"\	        V\
        \        \        P                  34      '       d   V P                  V4      pEM\	        V\        4      '       d`   \        P                  ! V P                  R4      '       d9   \        VP                  R7      P!                  R4      pV P                  V4      pEMo\	        V\"        4      '       d   V P%                  V4      pEMF\	        V\&        \        P(                  34      '       d   V P+                  V4      pEM\	        V\,        4      '       d;   \        P                  ! V P                  R4      '       d   V P/                  V4      pEM\        P0                  ! V4      '       dt   \	        V P                  \2        4      '       g   \5        V 4      h\7        RV 4      pVP9                  WP                  P:                  ,          \<        P>                  4      pEM.\        P                  ! VR4      '       d   V PA                  V4      pM\C        V4      '       d"   V PE                  V\<        P>                  4      pM\        P                  ! VR4      '       g   \	        V\F        4      '       d   V PI                  V4      # \K        V4      '       ds   \	        V P                  \2        4      '       g   \5        V 4      h\7        RV 4      pVP9                  WP                  P:                  ,          \<        P>                  4      pM\L        # \	        V\        PN                  4      '       dK   \        P                  ! VP                  R4      '       d$   ^ RI(H)p VPT                  ! W3P                  R	7      # V# )
r   NMmdayssr+  rp   r&  r  r   )+r[  ra   r   rA  r   r   r   r   timedelta64r5  r   r   r  r   r   r   rv  r   r.  r   
datetime64r  r   r*  
is_integerrM   r+   r   _addsub_int_array_or_scalar_nr  rU  r9  rF   rY  rK   r  rD   r  rx  r  rq   r7  r   r   other_dtyper   tdobjrq   s   &&     ry   rc  DatetimeLikeArrayMixin.__add__t  s   eWd3.u5 C<:>--/Fi@AA33E:Fs##

D(I(I(005B33B7Fz**%%e,F"--8992259Fv&&3??4::s+K+K%%e,F^^E"" djj+66.t44}d+C44UYY\\5I8<<XF __[#..2259F[))..uhllCF__[#..*3
 3
 //66k**djj+66.t44}d+C44UYY\\5I8<<XF "!fbjj))coofllC.P.P9!00||LLr{   c                	$    V P                  V4      # r}   )rc  r   s   &&ry   __radd__DatetimeLikeArrayMixin.__radd__  s    ||E""r{   __sub__c                	   \        VR R4      p\        V4      pV\        J d   V P                  4       pEM)\	        V\
        \        \        P                  34      '       d   V P                  V) 4      pEM\	        V\        4      '       da   \        P                  ! V P                  R4      '       d:   \        VP                  R7      P!                  R4      pV P                  V) 4      pEMt\	        V\"        4      '       d   V P%                  V) 4      pEMJ\	        V\&        \        P(                  34      '       d   V P+                  V4      pEM\        P,                  ! V4      '       dt   \	        V P                  \.        4      '       g   \1        V 4      h\3        RV 4      pVP5                  WP                  P6                  ,          \8        P:                  4      pEM\	        V\<        4      '       d   V P?                  V4      pEMY\        P                  ! VR4      '       d   V PA                  V) 4      pEM(\C        V4      '       d"   V PE                  V\8        P:                  4      pM\        P                  ! VR4      '       g   \	        V\F        4      '       d   V PI                  V4      pM\	        V\.        4      '       d   V P?                  V4      pM\K        V4      '       ds   \	        V P                  \.        4      '       g   \1        V 4      h\3        RV 4      pVP5                  WP                  P6                  ,          \8        P:                  4      pM\L        # \	        V\        PN                  4      '       dK   \        P                  ! VP                  R4      '       d$   ^ RI(H)p VPT                  ! W3P                  R	7      # V# )
r   Nre  rf  rh  rp   r+  r&  r  r   )+r[  ra   r   rE  r   r   r   r   ri  r5  r   r   r  r   r   r   rv  r   r.  r   rj  r  rk  rM   r+   r   rl  rm  r  rV  r   rN  r9  rF   rY  rK   r  rD   r  rx  r  rq   r7  rn  s   &&     ry   rv  DatetimeLikeArrayMixin.__sub__  s   eWd3.u5 C<:>--/Fi@AA33UF;Fs##

D(I(I(005B33RC8Fz**%%uf-F"--8992259F^^E"" djj+66.t44}d+C44UYY\\5I8<<XFv&&))%0F __[#..22E6:F[))..uhllCF__[#..*3
 3
 11%8F[11))%0Fk**djj+66.t44}d+C44UYY\\5I8<<XF "!fbjj))coofllC.P.P9!00||LLr{   c           	     	   \        VR R4      p\        P                  ! VR4      ;'       g    \        V\        4      pV'       d   \        P                  ! V P
                  R4      '       dp   \        P                  ! V4      '       d   \        V4      V ,
          # \        V\        4      '       g$   ^ RI	H
p VP                  ! WP
                  R7      pW,
          # V P
                  P                  R8X  d`   \        VR 4      '       dN   V'       gF   \        R\        V 4      P                    R\        V4      P                    RVP
                   R	24      h\        V P
                  \"        4      '       dL   \        P                  ! VR4      '       d/   \        R\        V 4      P                    RVP
                   24      h\        P                  ! V P
                  R4      '       d   \%        R
V 4      p V ) V,           # W,
          pVP
                  P                  R8X  d8   \        R\        V 4      P                    R\        V4      P                    24      hV) # )r   Nr&  r+  r  r   rI  rJ  [r  rq   )r[  r   r  r   rK   r   r	  r   r   r  ro   r7  r0  ri  r:  r;  r<  rM   r   )r   r   ro  other_is_dt64ro   flippeds   &&    ry   __rsub__DatetimeLikeArrayMixin.__rsub__  s   eWd3S9 
 
Z>
 S__TZZ== }}U## '$..e%;<<<%44U++N<ZZ__#w(?(? "4:#6#6"7v;''(%++a9  

K00S__[RU5V5V.tDz/B/B.C6%++WXX__TZZ--($/DEU?",==$"4:#6#6"7vd5k>R>R=ST  xr{   c                   V ^8  d   QhRR/# rE  rw   )rx   s   "ry   rz   r            r{   c                	    W,           pVR ,          V R &   \        V P                  \        4      '       g   VP                  V n        V # :NNNr   r   rM   r   r  r   r   r   s   && ry   __iadd__DatetimeLikeArrayMixin.__iadd__  7    )Q$**k22DJr{   c                   V ^8  d   QhRR/# rE  rw   )rx   s   "ry   rz   r   "  r  r{   c                	    W,
          pVR ,          V R &   \        V P                  \        4      '       g   VP                  V n        V # r  r  r  s   && ry   __isub__DatetimeLikeArrayMixin.__isub__"  r  r{   c               $    V ^8  d   QhRRRRRR/# )rt   qsznpt.NDArray[np.float64]interpolationrv   r   r
   rw   )rx   s   "ry   rz   r   /  s-     E E#E E 
	Er{   c                	$   < \         SV `  WR 7      # ))r  r  )r  	_quantile)r   r  r  r  s   &&&ry   r   DatetimeLikeArrayMixin._quantile.  s     w B DDr{   axisc                    V ^8  d   QhRRRR/# rt   r  AxisInt | Noner[  r   rw   )rx   s   "ry   rz   r   7       9 9> 9$ 9r{   c                   \         P                  ! RV4       \         P                  ! WP                  4       \        P
                  ! V P                  WR7      pV P                  W4      # )z
Return the minimum value of the Array or minimum along
an axis.

See Also
--------
numpy.ndarray.min
Index.min : Return the minimum value in an Index.
Series.min : Return the minimum value in a Series.
r  r[  rw   )nvvalidate_minvalidate_minmax_axisr   rT   nanminr   _wrap_reduction_resultr   r  r[  r   r   s   &$$, ry   minDatetimeLikeArrayMixin.min6  I     	F#
ii0t}}4G**488r{   c                    V ^8  d   QhRRRR/# r  rw   )rx   s   "ry   rz   r   I  r  r{   c                   \         P                  ! RV4       \         P                  ! WP                  4       \        P
                  ! V P                  WR7      pV P                  W4      # )z
Return the maximum value of the Array or maximum along
an axis.

See Also
--------
numpy.ndarray.max
Index.max : Return the maximum value in an Index.
Series.max : Return the maximum value in a Series.
r  rw   )r  validate_maxr  r   rT   nanmaxr   r  r  s   &$$, ry   maxDatetimeLikeArrayMixin.maxH  r  r{   c                    V ^8  d   QhRRRR/# )rt   r[  r   r  r  rw   )rx   s   "ry   rz   r   Z  s     89 89d 89 89r{   c               
   \        V P                  \        4      '       d#   \        R\	        V 4      P
                   R24      h\        P                  ! V P                  W!V P                  4       R7      pV P                  W#4      # )a  
Return the mean value of the Array.

Parameters
----------
skipna : bool, default True
    Whether to ignore any NaT elements.
axis : int, optional, default 0
    Axis for the function to be applied on.

Returns
-------
scalar
    Timestamp or Timedelta.

See Also
--------
numpy.ndarray.mean : Returns the average of array elements along a given axis.
Series.mean : Return the mean value in a Series.

Notes
-----
mean is only defined for Datetime and Timedelta dtypes, not for Period.

Examples
--------
For :class:`pandas.DatetimeIndex`:

>>> idx = pd.date_range("2001-01-01 00:00", periods=3)
>>> idx
DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'],
              dtype='datetime64[us]', freq='D')
>>> idx.mean()
Timestamp('2001-01-02 00:00:00')

For :class:`pandas.TimedeltaIndex`:

>>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit="D")
>>> tdelta_idx
TimedeltaIndex(['1 days', '2 days', '3 days'],
                dtype='timedelta64[s]', freq=None)
>>> tdelta_idx.mean()
Timedelta('2 days 00:00:00')
zmean is not implemented for zX since the meaning is ambiguous.  An alternative is obj.to_timestamp(how='start').mean()r  r[  rS  )r   r   rM   r:  r;  r<  rT   nanmeanr   rQ   r  )r   r[  r  r   s   &$$ ry   meanDatetimeLikeArrayMixin.meanZ  st    Z djj+...tDz/B/B.C D7 7  MM$))+
 **488r{   c                    V ^8  d   QhRRRR/# r  rw   )rx   s   "ry   rz   r     s     9 9n 9T 9r{   c               	    \         P                  ! RV4       Ve&   \        V4      V P                  8  d   \	        R4      h\
        P                  ! V P                  WR7      pV P                  W4      # )Nz abs(axis) must be less than ndimr  rw   )	r  validate_medianabsr   r   rT   	nanmedianr   r  r  s   &$$, ry   medianDatetimeLikeArrayMixin.median  sZ    
2v&D	TYY 6?@@!!$--dJ**488r{   c                   V ^8  d   QhRR/# )rt   dropnar   rw   )rx   s   "ry   rz   r     s     0 0D 0r{   c                	(   R pV'       d   V P                  4       p\        P                  ! V P                  R4      VR7      w  r4VP                  V P                  P
                  4      p\        \        P                  V4      pV P                  V4      # )Nr   )rS  )
rQ   rR   moder   r   r   r   r   rx  r   )r   r  rS  i8modes_npmodess   &&    ry   _modeDatetimeLikeArrayMixin._mode  sh    99;D__TYYt_4@
,,t}}223rzz7+&&w//r{   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rt   howrv   has_dropped_nar   	min_countintngroupsidsznpt.NDArray[np.intp]rw   )rx   s   "ry   rz   r     sE     H3 H3 H3 	H3
 H3 H3 "H3r{   c               	   V P                   pVP                  R 8X  d1   VR9   d   \        RV R24      hVR9   d   \        RV RV R24      hM\\        V\        4      '       d1   VR9   d   \        RV R24      hVR9   d   \        RV RV R24      hMVR9   d   \        RV R24      hT P
                  P                  R	4      p^ R
IHp	 V	P                  V4      p
V	! WVR7      pVP                  ! V3RVRVRVRR/VB pVP                  VP                  9   d   V# VP                   R	8X  g   Q hVR9   d|   ^ RIHp \        V P                   \        4      '       d   \        R4      h\        RV 4      p RV P                    R2pVP                  V4      pVP"                  ! WP                   R7      # VP                  V P
                  P                   4      pV P%                  V4      # )r&  z,datetime64 type does not support operation 'rh  zN' with datetime64 dtypes is no longer supported. Use (obj != pd.Timestamp(0)).z() instead.zPeriod type does not support z operationszK' with PeriodDtype is no longer supported. Use (obj != pd.Period(0, freq)).z"timedelta64 type does not support r   )WrappedCythonOp)r  r0  r  r  r  comp_idsrS  Nr  z-'std' and 'sem' are not valid for PeriodDtyper  zm8[r  r   )sumprodcumsumcumprodvarskewkurt)r  all)r  r  r  r  r  )stdsem)r   r0  r:  r   rM   r   r   pandas.core.groupby.opsr  get_kind_from_how_cython_op_ndim_compatr  cast_blocklistr  rq   r   ru  r  r   )r   r  r  r  r  r  r   r   npvaluesr  r0  r~   r  rq   	new_dtypes   &$$$$$,        ry   _groupby_op"DatetimeLikeArrayMixin._groupby_op  s*    

::QQ"NseST UVVn$u 4475E  % {++QQ"?uK PQQn$u 77:e;H  % >>@[QRR ==%%h/;005O..

 
 	

 
 

 66R&&&  8+++. 9$**k22 OPP8$?Ddii[*I#3J!--j@P@PQQ__T]]%8%89
&&z22r{   r  )NNF)F)NNr   ).r}   )cr<  
__module____qualname____firstlineno____doc____annotations__r@   r   r   propertyr   r   r   r   r   r   r   r   r   r   r   r   r  r
  r  r  r8  r   rV  r]  rd  rc  rZ  r  r   r  r\   r  rV   rQ   r  r  r!   r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r*  r.  r5  r9  r3  rA  rE  rN  rY  ra  re   rc  rt  rv  r}  r  r  r   r  r  r  r  r  r  r  __static_attributes____classcell__r  s   @ry   r   r      s    $#44))
 (
 ( ((((.(,(D: 
( 
(
(',
(:>
(( C C 
 &<! !,
71 71r  B BC C? ?# #
 "H;)  %	;)
 ;)z>@D" 
 
" 	  	 2,n ! ! ' ' .24< !! !!F ! !F   - - ? ? ? ? @ @7v (	2G(4H'	2G(4H+M:K,^<L,^<L-o>M'	2G(4H*<8J+M:K
 $ ' 'R Q QB   * *$ 
- 
- U U& 
 
(.(.$ 
 
 
 
* 2 2&  0 " "H@t @ i(9 )9v# i(9 )9v'R E E 9D 9 9 9" 9D 9 9 9"89T 89! 89t 9t 9D 9 90H3 H3r{   r   c                  &    ] tR tRtRtR R ltRtR# )DatelikeOpsi  zC
Common ops for DatetimeIndex/PeriodIndex, but not TimedeltaIndex.
c                    V ^8  d   QhRRRR/# )rt   r   rv   r   r   rw   )rx   s   "ry   rz   DatelikeOps.__annotate__  s     21 21C 21,C 21r{   c                    V P                  V\        P                  R7      p\        4       '       d(   ^ RIHp \        W#! \        P                  R7      R7      # VP                  \        RR7      # )a  
Convert to Index using specified date_format.

Return an Index of formatted strings specified by date_format, which
supports the same string format as the python standard library. Details
of the string format can be found in `python string format
doc <https://docs.python.org/3/library/datetime.html
#strftime-and-strptime-behavior>`__.

Formats supported by the C `strftime` API but not by the python string format
doc (such as `"%R"`, `"%r"`) are not officially supported and should be
preferably replaced with their supported equivalents (such as `"%H:%M"`,
`"%I:%M:%S %p"`).

Note that `PeriodIndex` support additional directives, detailed in
`Period.strftime`.

Parameters
----------
date_format : str
    Date format string (e.g. "%%Y-%%m-%%d").

Returns
-------
ndarray[object]
    NumPy ndarray of formatted strings.

See Also
--------
to_datetime : Convert the given argument to datetime.
DatetimeIndex.normalize : Return DatetimeIndex with times to midnight.
DatetimeIndex.round : Round the DatetimeIndex to the specified freq.
DatetimeIndex.floor : Floor the DatetimeIndex to the specified freq.
Timestamp.strftime : Format a single Timestamp.
Period.strftime : Format a single Period.

Examples
--------
>>> rng = pd.date_range(pd.Timestamp("2018-03-10 09:00"), periods=3, freq="s")
>>> rng.strftime("%B %d, %Y, %r")
Index(['March 10, 2018, 09:00:00 AM', 'March 10, 2018, 09:00:01 AM',
       'March 10, 2018, 09:00:02 AM'],
      dtype='str')
)r   r   )StringDtyper5  r   Fr,  )	r   r   r  r   r  r  rz  r8  r   )r   r   r   r  s   &&  ry   strftimeDatelikeOps.strftime  sS    Z **{266*R*F+rvv*FGG}}V%}00r{   rw   N)r<  r  r  r  r  r  r  rw   r{   ry   r  r    s    21 21r{   r  c                  *  a  ] tR tRtRt]R 4       t]R 4       t]P                  R R l4       t]
R R l4       t]
]R	 R
 l4       4       t]R R l4       t]R R l4       t]R R l4       tR;R R lltR tR V 3R lltR tR<R R lltR<R R lltR<R R lltRRR R/R! R" lltRRR R/R# R$ lltR% R& ltR' R( ltR) V 3R* lltR=R, V 3R- lllt]R>R. V 3R/ lll4       tR?R0 V 3R1 llltR2 R3 lt R4R+R5RR^ /R6 V 3R7 lllt!]R8 R9 l4       t"R:t#V ;t$# )@r  i0  zC
Common ops for TimedeltaIndex/DatetimeIndex, but not PeriodIndex.
c                	    \        V 4      hr}   r   )rA  r   r   s   &&&ry   _validate_dtypeTimelikeOps._validate_dtype5  s    !#&&r{   c                    V P                   # )a  
Return the frequency object if it is set, otherwise None.

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

See Also
--------
DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.
PeriodIndex.freq : Return the frequency object if it is set, otherwise None.

Examples
--------
>>> datetimeindex = pd.date_range(
...     "2022-02-22 02:22:22", periods=10, tz="America/Chicago", freq="h"
... )
>>> datetimeindex
DatetimeIndex(['2022-02-22 02:22:22-06:00', '2022-02-22 03:22:22-06:00',
               '2022-02-22 04:22:22-06:00', '2022-02-22 05:22:22-06:00',
               '2022-02-22 06:22:22-06:00', '2022-02-22 07:22:22-06:00',
               '2022-02-22 08:22:22-06:00', '2022-02-22 09:22:22-06:00',
               '2022-02-22 10:22:22-06:00', '2022-02-22 11:22:22-06:00'],
              dtype='datetime64[us, America/Chicago]', freq='h')
>>> datetimeindex.freq
<Hour>
r  r   s   &ry   r   TimelikeOps.freq9  s    8 zzr{   c                   V ^8  d   QhRR/# r!  rw   )rx   s   "ry   rz   TimelikeOps.__annotate__X  s     
 
T 
r{   c                	   Ve{   \        V4      pV P                  W4       V P                  P                  R8X  d(   \	        V\
        \        34      '       g   \        R4      hV P                  ^8  d   \        R4      hWn
        R # )Nr+  (TimedeltaArray/Index freq must be a TickzCannot set freq with ndim > 1)r&   _validate_frequencyr   r0  r   r   r   r:  r   r   r  r   s   &&ry   r   r  W  sh    e$E$$T1zz#%js.L.L JKKyy1} !@AA
r{   c                    V ^8  d   QhRRRR/# )rt   validate_kwdsdictr   r   rw   )rx   s   "ry   rz   r  e  s     6 64 6D 6r{   c                l   Vf
   RV n         R# VR8X  d-   V P                   f   \        V P                  4      V n         R# R# V\        P                  J d   R# V P                   f0   \        V4      p\        V 4      P                  ! W3/ VB  Wn         R# \        V4      p\        WP                   4       R# )z
Constructor helper to pin the appropriate `freq` attribute.  Assumes
that self._freq is currently set to any freq inferred in
_from_sequence_not_strict.
Ninfer)r  r&   r  r   
no_defaultr;  r  _validate_inferred_freq)r   r   r  s   &&&ry   _maybe_pin_freqTimelikeOps._maybe_pin_freqd  s     <DJW_ zz! 't'9'9:
 " S^^# ZZ T?DJ**4GGJ T?D#D**5r{   c                    V ^8  d   QhRRRR/# )rt   r   r   r   r   rw   )rx   s   "ry   rz   r    s     ( (j (t (r{   c                   VP                   pVP                  ^ 8X  g   WBP                  8X  d   R#  V P                  ! R
RV^ ,          RRR\	        V4      RVRVP
                  /VB p\        P                  ! VP                  VP                  4      '       g   \        hR#   \         d4   pR\        T4      9   d   Th\        RT R	TP                   24      ThRp?ii ; i)a%  
Validate that a frequency is compatible with the values of a given
Datetime Array/Index or Timedelta Array/Index

Parameters
----------
index : DatetimeIndex or TimedeltaIndex
    The index on which to determine if the given frequency is valid
freq : DateOffset
    The frequency to validate
Nstartendperiodsr   ru  z	non-fixedInferred frequency 9 from passed values does not conform to passed frequency rw   )r  r  r  _generate_ranger   ru  r   array_equalr   r   rv   )rA  indexr   r   inferredon_freqr\  s   &&&,   ry   r  TimelikeOps._validate_frequency  s     &&::?h,,6	)) Ah E
 	
 ZZ G >>%**gll;;   < 	c#h& 	 %hZ 088<~G 	s   A-B   C+.CCc                    V ^8  d   QhRRRR/# )rt   r  
int | Noner   r
   rw   )rx   s   "ry   rz   r    s     ' '",'	'r{   c                	    \        V 4      hr}   r   )rA  r  r  r  r   r   r   s   &&&&&*,ry   r  TimelikeOps._generate_range  s     "#&&r{   c                   V ^8  d   QhRR/# )rt   r   r  rw   )rx   s   "ry   rz   r    s     8 8 8r{   c                	@    \        V P                  P                  4      # r}   )r    r   r   r   s   &ry   r1  TimelikeOps._creso  s    "4==#6#677r{   c                   V ^8  d   QhRR/# )rt   r   rl   rw   )rx   s   "ry   rz   r    s     ) )h )r{   c                ,    \        V P                  4      # )a  
The precision unit of the datetime data.

Returns the precision unit for the dtype.
It means the smallest time frame that can be stored within this dtype.

Returns
-------
str
    Unit string representation (e.g. "ns").

See Also
--------
TimelikeOps.as_unit : Converts to a specific unit.

Examples
--------
>>> idx = pd.DatetimeIndex(["2020-01-02 01:02:03.004005006"])
>>> idx.unit
'ns'
>>> idx.as_unit("s").unit
's'
)dtype_to_unitr   r   s   &ry   ru  TimelikeOps.unit  s    6 TZZ((r{   Tc               $    V ^8  d   QhRRRRRR/# )rt   ru  rl   ro  r   r   r
   rw   )rx   s   "ry   rz   r    s!     <
 <
H <
 <
 <
r{   c                   VR9  d   \        R4      h\        P                  ! V P                  P                   RV R24      p\	        V P
                  W2R7      p\        V P                  \        P                  4      '       d   VP                  pM"\        RV 4      P                  p\        WaR7      p\        V 4      P                  VVV P                  R7      # )	aZ  
Convert to a dtype with the given unit resolution.

The limits of timestamp representation depend on the chosen resolution.
Different resolutions can be converted to each other through as_unit.

Parameters
----------
unit : {'s', 'ms', 'us', 'ns'}
round_ok : bool, default True
    If False and the conversion requires rounding, raise ValueError.

Returns
-------
same type as self
    Converted to the specified unit.

See Also
--------
Timestamp.as_unit : Convert to the given unit.

Examples
--------
For :class:`pandas.DatetimeIndex`:

>>> idx = pd.DatetimeIndex(["2020-01-02 01:02:03.004005006"])
>>> idx
DatetimeIndex(['2020-01-02 01:02:03.004005006'],
              dtype='datetime64[ns]', freq=None)
>>> idx.as_unit("s")
DatetimeIndex(['2020-01-02 01:02:03'], dtype='datetime64[s]', freq=None)

For :class:`pandas.TimedeltaIndex`:

>>> tdelta_idx = pd.to_timedelta(["1 day 3 min 2 us 42 ns"])
>>> tdelta_idx
TimedeltaIndex(['1 days 00:03:00.000002042'],
                dtype='timedelta64[ns]', freq=None)
>>> tdelta_idx.as_unit("s")
TimedeltaIndex(['1 days 00:03:00'], dtype='timedelta64[s]', freq=None)
z)Supported units are 's', 'ms', 'us', 'ns'z8[r  rn  ro   r  r  )rh  msusns)r   r   r   r0  r   r   r   r   r(  rK   r;  r  r   )r   ru  ro  r   r4  r  r(  s   &&&    ry   rv  TimelikeOps.as_unit  s    T ..HIIDJJOO,BtfA67(Q
djj"((++"((Iot,//B'29I Dz%% & 
 	
r{   c                	    V P                   VP                   8w  dU   V P                   VP                   8  d   V P                  VP                  4      p W3# VP                  V P                  4      pW3# r}   )r1  rv  ru  r   s   &&ry   r  "TimelikeOps._ensure_matching_resos  sZ    ;;%,,&{{U\\)||EJJ/ { dii0{r{   c                    V ^8  d   QhRRRR/# )rt   ufuncznp.ufuncmethodrv   rw   )rx   s   "ry   rz   r  %  s     	I 	IX 	Is 	Ir{   c                	  < V\         P                  \         P                  \         P                  39   d:   \	        V4      ^8X  d*   V^ ,          V J d   \        W4      ! V P                  3/ VB # \        SV `   ! W.VO5/ VB # )r   )	r   isnanisinfisfiniter   r[  r   r  __array_ufunc__)r   r"  r#  inputsr   r  s   &&&*,ry   r(  TimelikeOps.__array_ufunc__%  sk    bhh"++66Fq q	T! 5)$--B6BBw&uHvHHHr{   c                	P   \        V P                  \        4      '       dM   \        R V 4      p V P	                  R4      pVP                  WW44      pVP	                  V P                  W4R7      # V P                  R4      p\        \        P                  V4      p\        WP                  4      pV^ 8X  d   V P                  4       # \        WrV4      p	V P                  V	\        R7      pVP                  V P                   P                  4      pV P#                  W`P                  R7      # )ro   N)	ambiguousnonexistentr   r  r   )r   r   rK   r   tz_localize_roundr(  r   r   rx  r*   r1  r   r(   r  r!   r   r  )
r   r   r  r,  r-  naiver   r   nanos	result_i8s
   &&&&&     ry   r0  TimelikeOps._round0  s    djj/22.D$$T*E\\$iEF%%9 &   4bjj&)"45A:99;!&6	))))ET]]001jj99r{   c               $    V ^8  d   QhRRRRRR/# rt   r,  r9   r-  r:   r   r
   rw   )rx   s   "ry   rz   r  F  s4     fT fT !fT %	fT
 
fTr{   c                D    V P                  V\        P                  W#4      # )av  
Perform round operation on the data to the specified `freq`.

Parameters
----------
freq : str or Offset
    The frequency level to round the index to. Must be a fixed
    frequency like 's' (second) not 'ME' (month end). See
    :ref:`frequency aliases <timeseries.offset_aliases>` for
    a list of possible `freq` values.
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
    Only relevant for DatetimeIndex:

    - 'infer' will attempt to infer fall dst-transition hours based on
      order
    - bool-ndarray where True signifies a DST time, False designates
      a non-DST time (note that this flag is only applicable for
      ambiguous times)
    - 'NaT' will return NaT where there are ambiguous times
    - 'raise' will raise a ValueError if there are ambiguous
      times.

nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta,             default 'raise'
    A nonexistent time does not exist in a particular timezone
    where clocks moved forward due to DST.

    - 'shift_forward' will shift the nonexistent time forward to the
      closest existing time
    - 'shift_backward' will shift the nonexistent time backward to the
      closest existing time
    - 'NaT' will return NaT where there are nonexistent times
    - timedelta objects will shift nonexistent times by the timedelta
    - 'raise' will raise a ValueError if there are
      nonexistent times.

Returns
-------
DatetimeIndex, TimedeltaIndex, or Series
    Index of the same type for a DatetimeIndex or TimedeltaIndex,
    or a Series with the same index for a Series.

Raises
------
ValueError if the `freq` cannot be converted.

See Also
--------
DatetimeIndex.floor :
    Perform floor operation on the data to the specified `freq`.
DatetimeIndex.snap :
    Snap time stamps to nearest occurring frequency.

Notes
-----
If the timestamps have a timezone, rounding will take place relative to the
local ("wall") time and re-localized to the same timezone. When rounding
near daylight savings time, use ``nonexistent`` and ``ambiguous`` to
control the re-localization behavior.

Examples
--------
**DatetimeIndex**

>>> rng = pd.date_range("1/1/2018 11:59:00", periods=3, freq="min")
>>> rng
DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
               '2018-01-01 12:01:00'],
              dtype='datetime64[us]', freq='min')

>>> rng.round('h')
DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
               '2018-01-01 12:00:00'],
              dtype='datetime64[us]', freq=None)

**Series**

>>> pd.Series(rng).dt.round("h")
0   2018-01-01 12:00:00
1   2018-01-01 12:00:00
2   2018-01-01 12:00:00
dtype: datetime64[us]

When rounding near a daylight savings time transition, use ``ambiguous`` or
``nonexistent`` to control how the timestamp should be re-localized.

>>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")

>>> rng_tz.floor("2h", ambiguous=False)
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
              dtype='datetime64[us, Europe/Amsterdam]', freq=None)

>>> rng_tz.floor("2h", ambiguous=True)
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
              dtype='datetime64[us, Europe/Amsterdam]', freq=None)
)r0  r'   NEAREST_HALF_EVENr   r   r,  r-  s   &&&&ry   roundTimelikeOps.roundF  s    L {{4!:!:ISSr{   c               $    V ^8  d   QhRRRRRR/# r6  rw   )rx   s   "ry   rz   r    s4     fN fN !fN %	fN
 
fNr{   c                D    V P                  V\        P                  W#4      # )au  
Perform floor operation on the data to the specified `freq`.

Parameters
----------
freq : str or Offset
    The frequency level to floor the index to. Must be a fixed
    frequency like 's' (second) not 'ME' (month end). See
    :ref:`frequency aliases <timeseries.offset_aliases>` for
    a list of possible `freq` values.
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
    Only relevant for DatetimeIndex:

    - 'infer' will attempt to infer fall dst-transition hours based on
      order
    - bool-ndarray where True signifies a DST time, False designates
      a non-DST time (note that this flag is only applicable for
      ambiguous times)
    - 'NaT' will return NaT where there are ambiguous times
    - 'raise' will raise a ValueError if there are ambiguous
      times.

nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta,             default 'raise'
    A nonexistent time does not exist in a particular timezone
    where clocks moved forward due to DST.

    - 'shift_forward' will shift the nonexistent time forward to the
      closest existing time
    - 'shift_backward' will shift the nonexistent time backward to the
      closest existing time
    - 'NaT' will return NaT where there are nonexistent times
    - timedelta objects will shift nonexistent times by the timedelta
    - 'raise' will raise a ValueError if there are
      nonexistent times.

Returns
-------
DatetimeIndex, TimedeltaIndex, or Series
    Index of the same type for a DatetimeIndex or TimedeltaIndex,
    or a Series with the same index for a Series.

Raises
------
ValueError if the `freq` cannot be converted.

See Also
--------
DatetimeIndex.floor :
    Perform floor operation on the data to the specified `freq`.
DatetimeIndex.snap :
    Snap time stamps to nearest occurring frequency.

Notes
-----
If the timestamps have a timezone, flooring will take place relative to the
local ("wall") time and re-localized to the same timezone. When flooring
near daylight savings time, use ``nonexistent`` and ``ambiguous`` to
control the re-localization behavior.

Examples
--------
**DatetimeIndex**

>>> rng = pd.date_range("1/1/2018 11:59:00", periods=3, freq="min")
>>> rng
DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
               '2018-01-01 12:01:00'],
              dtype='datetime64[us]', freq='min')

>>> rng.floor('h')
DatetimeIndex(['2018-01-01 11:00:00', '2018-01-01 12:00:00',
               '2018-01-01 12:00:00'],
              dtype='datetime64[us]', freq=None)

**Series**

>>> pd.Series(rng).dt.floor("h")
0   2018-01-01 11:00:00
1   2018-01-01 12:00:00
2   2018-01-01 12:00:00
dtype: datetime64[us]

When rounding near a daylight savings time transition, use ``ambiguous`` or
``nonexistent`` to control how the timestamp should be re-localized.

>>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")

>>> rng_tz.floor("2h", ambiguous=False)
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
             dtype='datetime64[us, Europe/Amsterdam]', freq=None)

>>> rng_tz.floor("2h", ambiguous=True)
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
              dtype='datetime64[us, Europe/Amsterdam]', freq=None)
)r0  r'   MINUS_INFTYr9  s   &&&&ry   floorTimelikeOps.floor  s    L {{4!4!4iMMr{   c               $    V ^8  d   QhRRRRRR/# r6  rw   )rx   s   "ry   rz   r  	  s4     fM fM !fM %	fM
 
fMr{   c                D    V P                  V\        P                  W#4      # )al  
Perform ceil operation on the data to the specified `freq`.

Parameters
----------
freq : str or Offset
    The frequency level to ceil the index to. Must be a fixed
    frequency like 's' (second) not 'ME' (month end). See
    :ref:`frequency aliases <timeseries.offset_aliases>` for
    a list of possible `freq` values.
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
    Only relevant for DatetimeIndex:

    - 'infer' will attempt to infer fall dst-transition hours based on
      order
    - bool-ndarray where True signifies a DST time, False designates
      a non-DST time (note that this flag is only applicable for
      ambiguous times)
    - 'NaT' will return NaT where there are ambiguous times
    - 'raise' will raise a ValueError if there are ambiguous
      times.

nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta,             default 'raise'
    A nonexistent time does not exist in a particular timezone
    where clocks moved forward due to DST.

    - 'shift_forward' will shift the nonexistent time forward to the
      closest existing time
    - 'shift_backward' will shift the nonexistent time backward to the
      closest existing time
    - 'NaT' will return NaT where there are nonexistent times
    - timedelta objects will shift nonexistent times by the timedelta
    - 'raise' will raise a ValueError if there are
      nonexistent times.

Returns
-------
DatetimeIndex, TimedeltaIndex, or Series
    Index of the same type for a DatetimeIndex or TimedeltaIndex,
    or a Series with the same index for a Series.

Raises
------
ValueError if the `freq` cannot be converted.

See Also
--------
DatetimeIndex.floor :
    Perform floor operation on the data to the specified `freq`.
DatetimeIndex.snap :
    Snap time stamps to nearest occurring frequency.

Notes
-----
If the timestamps have a timezone, ceiling will take place relative to the
local ("wall") time and re-localized to the same timezone. When ceiling
near daylight savings time, use ``nonexistent`` and ``ambiguous`` to
control the re-localization behavior.

Examples
--------
**DatetimeIndex**

>>> rng = pd.date_range("1/1/2018 11:59:00", periods=3, freq="min")
>>> rng
DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
               '2018-01-01 12:01:00'],
              dtype='datetime64[us]', freq='min')

>>> rng.ceil('h')
DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
               '2018-01-01 13:00:00'],
              dtype='datetime64[us]', freq=None)

**Series**

>>> pd.Series(rng).dt.ceil("h")
0   2018-01-01 12:00:00
1   2018-01-01 12:00:00
2   2018-01-01 13:00:00
dtype: datetime64[us]

When rounding near a daylight savings time transition, use ``ambiguous`` or
``nonexistent`` to control how the timestamp should be re-localized.

>>> rng_tz = pd.DatetimeIndex(["2021-10-31 01:30:00"], tz="Europe/Amsterdam")

>>> rng_tz.ceil("h", ambiguous=False)
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
              dtype='datetime64[us, Europe/Amsterdam]', freq=None)

>>> rng_tz.ceil("h", ambiguous=True)
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
              dtype='datetime64[us, Europe/Amsterdam]', freq=None)
)r0  r'   
PLUS_INFTYr9  s   &&&&ry   ceilTimelikeOps.ceil	  s    L {{4!3!3YLLr{   r  Nr[  c               $    V ^8  d   QhRRRRRR/# rt   r  r  r[  r   r   rw   )rx   s   "ry   rz   r  	  s&     X X> X$ X$ Xr{   c               	d    \         P                  ! V P                  WV P                  4       R 7      # r  )rT   nananyr   rQ   r   r  r[  s   &$$ry   r  TimelikeOps.any	  s    }}T]]499;WWr{   c               $    V ^8  d   QhRRRRRR/# rG  rw   )rx   s   "ry   rz   r  	  s&     X X> X$ X$ Xr{   c               	d    \         P                  ! V P                  WV P                  4       R 7      # rI  )rT   nanallr   rQ   rK  s   &$$ry   r  TimelikeOps.all	  s!     }}T]]499;WWr{   c                   V ^8  d   QhRR/# r!  rw   )rx   s   "ry   rz   r  	  s      4 r{   c                	    R V n         R # r}   r  r   s   &ry   r  TimelikeOps._maybe_clear_freq	  s	    
r{   c                   V ^8  d   QhRR/# rE  rw   )rx   s   "ry   rz   r  	  s      $ r{   c                J   Vf   M\        V 4      ^ 8X  dZ   \        V\        4      '       dD   V P                  P                  R8X  d(   \        V\
        \        34      '       g   \        R4      hMVR8X  g   Q h\        V P                  4      pV P                  4       pWn        V# )z
Helper to get a view on the same data, with a new freq.

Parameters
----------
freq : DateOffset, None, or "infer"

Returns
-------
Same type as self
r+  r  r  )r   r   r   r   r0  r   r   r:  r&   r  r   r  )r   r   r   s   && ry   
_with_freqTimelikeOps._with_freq	  s     <Y!^
4 < <zz#%jc{.K.K JKK 7?"?T//0Diik	
r{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r  	  s     * ** *r{   c                	   < \        V P                  \        P                  4      '       d   V P                  # \        SV `  4       # r}   )r   r   r   r   r  _values_for_json)r   r  s   &ry   rZ  TimelikeOps._values_for_json	  s0    djj"((++== w'))r{   Fc                    V ^8  d   QhRRRR/# )rt   use_na_sentinelr   sortrw   )rx   s   "ry   rz   r  	  s"     B BB Br{   c                	  < V P                   e   V'       dc   V P                   P                  ^ 8  dH   \        P                  ! \	        V 4      ^,
          RR\        P
                  R7      pV R R R1,          pW43# \        P                  ! \	        V 4      \        P
                  R7      pV P                  4       pW43# V'       d#   \        R\        V 4      P                   R24      h\        SV `-  VR7      # )Nr   zThe 'sort' keyword in zu.factorize is ignored unless arr.freq is not None. To factorize with sort, call pd.factorize(obj, sort=True) instead.)r]  )r   r   r   aranger   intpr   NotImplementedErrorr;  r<  r  	factorize)r   r]  r^  codesuniquesr  s   &&&  ry   rd  TimelikeOps.factorize	  s    
 99 		a		#d)a-RrwwGtt* >! 		#d)277;))+>! &(d)<)<(= >= = 
 w  AAr{   c               $    V ^8  d   QhRRRRRR/# )rt   	to_concatzSequence[Self]r  r-   r   r
   rw   )rx   s   "ry   rz   r  	  s(      !  
	r{   c                	
  <a \         SV `  W4      pV^ ,          oV^ 8X  d   V Uu. uF  p\        V4      '       g   K  VNK  	  ppSP                  e   \        ;QJ d    V3R lV 4       F  '       d   K   RM	  RM! V3R lV 4       4      '       dk   \        VRR VR,          RR7      p\        ;QJ d    V3R lV 4       F  '       d   K   RM	  RM! V3R lV 4       4      '       d   SP                  pWcn        V# u upi )	r   Nc              3  T   <"   T F  qP                   SP                   8H  x  K  	  R # 5ir}   r   )r   r   rq  s   & ry   r   0TimelikeOps._concat_same_type.<locals>.<genexpr>	  s     +R	1FFchh,>	s   %(FT:r   NN)strictc              3     <"   T F6  q^ ,          R,          SP                   ,           V^,          ^ ,          8H  x  K8  	  R# 5i)r   Nr`  rl  )r   pairrq  s   & ry   r   rm  	  s-     NAwr{SXX-a;s   >Ar`  )r  _concat_same_typer   r   r  zipr  )	rA  ri  r  new_objr   pairsr  rq  r  s	   &&&    @ry   rq  TimelikeOps._concat_same_type	  s     '+I<l19 %.8IqQII8xx#+R	+R+R	+R(R(RIcrNIbM$G3NN333NNNN"xxH$,M 9s
   D D c                    V ^8  d   QhRRRR/# )rt   orderrv   r   r
   rw   )rx   s   "ry   rz   r  	  s      #  r{   c                	J   < \         SV `  VR 7      pV P                  Vn        V# ))rw  )r  r   r   r  )r   rw  rs  r  s   && ry   r   TimelikeOps.copy	  s#    ',U,+		r{   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )rt   r#  r2   r  r  r
  rn   r   r   r   r
   rw   )rx   s   "ry   rz   r  	  sE     $B $B #$B 	$B
 $B $B 
$Br{   c                  VR8w  d   \         hV'       g   V P                  p	MV P                  P                  4       p	\        P                  ! V	3RVRVRVRVRVRV/VB  V'       g   V # \        V 4      P                  WP                  R7      # )	z"
See NDFrame.interpolate.__doc__.
linearr#  r  r
  limitlimit_direction
limit_arear   )rc  r   r   rS   interpolate_2d_inplacer;  r  r   )
r   r#  r  r
  r}  r~  r  r   r   out_datas
   &$$$$$$$, ry   interpolateTimelikeOps.interpolate	  s      X%%}}H}}))+H&&		
		
 		
 			

 		
 ,		
 "		
 		
 KDz%%hjj%AAr{   
allow_fillr  c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )rt   indicesr8   r  r   r  r   r  r-   r   r
   rw   )rx   s   "ry   rz   r  
  s<       	
   
r{   c               	  < \         SV `  WW4R 7      p\        P                  ! V\        P                  R7      p\
        P                  ! V\        V 4      4      p\        V\        4      '       d   V P                  V4      pWun        V# ))r  r  r  r  r   )r  taker   r=  rb  r   maybe_indices_to_slicer   r   r  r
  r  )	r   r  r  r  r  r   maybe_slicer   r  s	   &&$$$   ry   r  TimelikeOps.take
  sp     z  
 **WBGG400#d)Dk5))))+6DLr{   c                   V ^8  d   QhRR/# r   rw   )rx   s   "ry   rz   r  )
  s       r{   c                "   \         P                  ! V P                  4      '       g   R# V P                  pV\        8g  p\        V P                  4      p\        V4      p\        P                  ! W!V,          ^ 8g  4      P                  4       ^ 8H  pV# )z
Check if we are round times at midnight (and no timezone), which will
be given a more compact __repr__ than other cases. For TimedeltaArray
we are checking for multiples of 24H.
F)
r   r  r   r   r!   r    r$   r   logical_andr  )r   
values_intconsider_valuesr*  ppd	even_dayss   &     ry   _is_dates_onlyTimelikeOps._is_dates_only(
  st     tzz**YY
$,"4::.d# NN?4D4IJNNPTUU	r{   r  r   )raiser  )TF)r   )C)%r<  r  r  r  r  classmethodr  r  r   setterr   r  r  r  r@   r1  ru  rv  r  r(  r0  r:  r?  rD  r  r  r  rV  rZ  rd  rq  r   r  r  r  r  r  r  s   @ry   r  r  0  s    ' '  : 
[[
 
 6 6@ (  (T ' ' 8 8 ) )8<
@	I 	I:,fTPfNPfMVXD X XXD X X@* *B B2   * 
$BL !	
   0  r{   r  c               $    V ^8  d   QhRRRRRR/# )rt   r   r   cls_namerv   r   ztuple[ArrayLike, bool]rw   )rx   s   "ry   rz   rz   B
  s$     $ $$ #$$r{   c                   \        V R 4      '       gQ   \        V \        \        34      '       g'   \        P
                  ! V 4      ^ 8X  d   \        V 4      p \        V 4      p RpM2\        V \        4      '       d   \        RV R24      h\        V RR7      p \        V \        4      '       g2   \        V \        4      '       d8   V P                  P                  R9   d   V P                  R\        R7      p RpW3# \        V \        4      '       d&   V P!                  4       p V P                  4       p RpW3# \        V \        P"                  \$        34      '       g   \        P&                  ! V 4      p W3# \        V \(        4      '       d8   V P*                  P-                  V P.                  \0        R	7      P2                  p RpW3# )
r   FzCannot create a z from a MultiIndex.Trs  r-  r9  r  r.  )ri  r   r   tupler   r   rB   rO   r:  rb   r_   r]   r   r0  r  r!   _maybe_convert_datelike_arrayrx  r^   r=  rN   r{  r  re  r   _values)r   r   r  s   &&&ry   !ensure_arraylike_for_datetimeliker  B
  sl    4!!$u..2774=A3E:D6t<	D-	(	(*8*4GHIIT6$%%4,--$**//T2I}}Wt}4  : 
D-	.	.113}} : rzz>:;;zz$ : 
D.	)	) ##DJJ3#?GG:r{   c                    V ^8  d   QhRRRR/# )rt   r  r   r   rw   )rx   s   "ry   rz   rz   j
  s     0 0d 0t 0r{   c                    R # r}   rw   r  s   &ry   validate_periodsr  i
  s    -0r{   c                    V ^8  d   QhRRRR/# )rt   r  r  r   rw   )rx   s   "ry   rz   rz   n
  s     . .c .c .r{   c                    R # r}   rw   r  s   &ry   r  r  m
  s    +.r{   c                    V ^8  d   QhRRRR/# )rt   r  r  r   rw   )rx   s   "ry   rz   rz   q
  s      j Z r{   c                b    V e+   \         P                  ! V 4      '       g   \        RV  24      hV # )z
If a `periods` argument is passed to the Datetime/Timedelta Array/Index
constructor, cast it to an integer.

Parameters
----------
periods : None, int

Returns
-------
periods : None or int

Raises
------
TypeError
    if periods is not None or int
z periods must be an integer, got )r   rk  r:  r  s   &ry   r  r  q
  s2    $ 3>>'#:#::7)DEE Nr{   c               $    V ^8  d   QhRRRRRR/# )rt   r   r   r  r   rw   )rx   s   "ry   rz   rz   
  s$      
,=r{   c                d    Ve,   V e"   W8w  d   \        RV RV P                   24      hV f   Tp V # )z
If the user passes a freq and another freq is inferred from passed data,
require that they match.

Parameters
----------
freq : DateOffset or None
inferred_freq : DateOffset or None

Returns
-------
freq : DateOffset or None
r  r  )r   r  )r   r  s   &&ry   r  r  
  sM        5%m_ 5?<<." 
 < DKr{   c                    V ^8  d   QhRRRR/# )rt   r   z'DatetimeTZDtype | np.dtype | ArrowDtyper   rv   rw   )rx   s   "ry   rz   rz   
  s     & &@ &S &r{   c                   \        V \        4      '       d   V P                  # \        V \        4      '       d8   V P                  R9  d   \        RV : R24      hV P                  P                  # \        P                  ! V 4      ^ ,          # )z
Return the unit str corresponding to the dtype's resolution.

Parameters
----------
dtype : DatetimeTZDtype or np.dtype
    If np.dtype, we assume it is a datetime64 dtype.

Returns
-------
str
r.  zdtype=z does not have a resolution.)	r   rK   ru  rI   r0  r   pyarrow_dtyper   datetime_datar   s   &ry   r  r  
  sq     %))zz	E:	&	&::T!x'CDEE""'''E"1%%r{   )__conditional_annotations__
__future__r   r   r   	functoolsr   r  typingr   r   r	   r
   r   r   r   r   r   rW  numpyr   pandas._configr   pandas._config.configr   pandas._libsr   r   pandas._libs.tslibsr   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   pandas._libs.tslibs.fieldsr'   r(   pandas._libs.tslibs.np_datetimer)   pandas._libs.tslibs.timedeltasr*   pandas._libs.tslibs.timestampsr+   pandas._typingr,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   pandas.compat.numpyr<   r  pandas.errorsr=   r>   r?   pandas.util._decoratorsr@   pandas.util._exceptionsrA   pandas.core.dtypes.castrB   pandas.core.dtypes.commonrC   rD   rE   rF   rG   rH   pandas.core.dtypes.dtypesrI   rJ   rK   rL   rM   pandas.core.dtypes.genericrN   rO   pandas.core.dtypes.missingrP   rQ   pandas.corerR   rS   rT   rU   pandas.core.algorithmsrV   rW   rX   pandas.core.array_algosrY   pandas.core.arraylikerZ   pandas.core.arrays._mixinsr[   r\   pandas.core.arrays.arrow.arrayr]   pandas.core.arrays.baser^   pandas.core.arrays.integerr_   pandas.core.commoncorecommonr  pandas.core.constructionr`   rz  ra   rb   pandas.core.indexersrc   rd   pandas.core.ops.commonre   pandas.core.ops.invalidrf   rg   pandas.tseriesrh   collections.abcri   rj   rk   rl   r  rn   r  ro   rp   rq   rr   r  r   r   r   r  r  r  r  r  r  )r  s   @ry   <module>r     s   " "  
 
 
   - ,     * K = C    $ / 
 5 K  
  
 ? * ? 2 3     
 <
 '  (  .7y 71
2k3X'B k3\171( 71tK( Kd$N 
 0 
 0 
 . 
 .2:&r{   