+
    ŜimH                       ^ RI Ht ^ RIHt ^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHtHtHt ^ RIHtHtHtHtHt ^ RIHt ^ R	IHtHt ^ R
IHtHtHt ^ RIHt ^ RI H!t!H"t" ^ RI#H$t$ ^ RI%H&t&H't'H(t( ^ RI)H*t*H+t+ ^ RI,H-t- ]'       d   ^ RI.H/t/ ^ RI0H1t1H2t2H3t3 ^ RI4H5t5 . R3Ot6]6 F  t7] F  t8]7 R]8 2t9]]7,          ]]9&   K  	  K!  	  R4 F  t7] F  t8]7 R]8 2t:]:]]:&   K  	  K  	  ] F  t;R]; 2]R]; 2&   K  	  R R lt<]"! R4      R R l4       t= ! R R4      t> ! R R]>4      t?R R  lt@R! R" ltAR# R$ ltBR% R& ltCR' R( ltDR) R* ltER+ R, ltFR- R. ltGR/ R0 ltHR1 R2 ltI. R5OtJR# )6    )annotations)TYPE_CHECKINGN)lib)unique_deltas)	Timestampget_unit_from_dtypeperiods_per_daytz_convert_from_utc)DAYSMONTH_ALIASESMONTH_NUMBERSMONTHSint_to_weekday)OFFSET_TO_PERIOD_FREQSTR)build_field_sarraymonth_position_check)
DateOffsetDay	to_offset)get_rule_month)cache_readonly
set_module)is_numeric_dtype)
ArrowDtypeDatetimeTZDtypePeriodDtype)ABCIndex	ABCSeries)unique)npt)DatetimeIndexSeriesTimedeltaIndex)DatetimeLikeArrayMixin-W-c                    V ^8  d   QhRRRR/# )   
offset_strstrreturn
str | None )formats   "c/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/pandas/tseries/frequencies.py__annotate__r0   O   s     : : : :    c                0    \         P                  ! V R4      # )z,
Alias to closest period strings BQ->Q etc.
N)r   get)r)   s   &r/   get_period_aliasr4   O   s     $''
D99r1   pandasc                    V ^8  d   QhRRRR/# )r(   indexz@DatetimeIndex | TimedeltaIndex | Series | DatetimeLikeArrayMixinr+   r,   r-   )r.   s   "r/   r0   r0   [   s      V VKVVr1   c                   ^ RI Hp \        V \        4      '       d   V P                  p\        V P
                  \        4      '       dJ   ^ RIpVP                  P                  VP
                  P                  4      '       d   VP                  4       p\        P                  ! VP
                  R4      '       gN   \        VP
                  \        4      '       g.   VP
                  \        8X  g   \!        RV P
                   24      hTp \#        V R4      '       g   M\        V P
                  \$        4      '       d   \!        R4      h\        P                  ! V P
                  R4      '       d   \'        V 4      pVP)                  4       # \+        V P
                  4      '       d   \!        RV P
                   24      h\        W4      '       g   V! V R	R
7      p \-        V 4      pVP)                  4       # )a0  
Infer the most likely frequency given the input index.

This method attempts to deduce the most probable frequency (e.g., 'D' for daily,
'H' for hourly) from a sequence of datetime-like objects. It is particularly useful
when the frequency of a time series is not explicitly set or known but can be
inferred from its values.

Parameters
----------
index : DatetimeIndex, TimedeltaIndex, Series or array-like
  If passed a Series will use the values of the series (NOT THE INDEX).

Returns
-------
str or None
    None if no discernible frequency.

Raises
------
TypeError
    If the index is not datetime-like.
ValueError
    If there are fewer than three values.

See Also
--------
date_range : Return a fixed frequency DatetimeIndex.
timedelta_range : Return a fixed frequency TimedeltaIndex with day as the default.
period_range : Return a fixed frequency PeriodIndex.
DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.

Examples
--------
>>> idx = pd.date_range(start="2020/12/01", end="2020/12/30", periods=30)
>>> pd.infer_freq(idx)
'D'
)r!   NmMz>cannot infer freq from a non-convertible dtype on a Series of dtypezJPeriodIndex given. Check the `freq` attribute instead of using infer_freq.mz8cannot infer freq from a non-convertible index of dtype F)copy)pandas.core.apir!   
isinstancer   _valuesr:   r   pyarrowtypesis_timestamppyarrow_dtype_to_datetimearrayr   is_np_dtyper   object	TypeErrorhasattrr   _TimedeltaFrequencyInfererget_freqr   _FrequencyInferer)r7   r!   valuespainferers   &    r/   
infer_freqrO   Z   sy   T .%##ekk:.. xx$$V\\%?%?@@113 OOFLL$//&,,88||v%""'++0   5'""	EKK	-	-X
 	
 
c	*	*,U3!!	%++	&	&Fu{{mT
 	
 e++e%0&Gr1   c                  n   ] tR t^tRtR R lt]R R l4       t]R R l4       t]R R	 l4       t	]R
 R l4       t
R R lt]R R l4       t]R R l4       t]R R l4       t]R R l4       tR R lt]R R l4       t]R R l4       tR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR*tR+# ),rK   z0
Not sure if I can avoid the state machine here
c                   V ^8  d   QhRR/# )r(   r+   Noner-   )r.   s   "r/   r0   _FrequencyInferer.__annotate__   s     
 
 
r1   c                	P   Wn         VP                  V n        \        V\        4      '       d0   \        VP                  P                  P                  4      V n	        M$\        VP                  P                  4      V n	        \        VR 4      '       d@   VP                  e2   \        V P                  VP                  V P                  R7      V n        \        V4      ^8  d   \        R4      hV P                   P                  ;'       g    V P                   P                   V n        R# )tzNresoz(Need at least 3 dates to infer frequency)r7   asi8i8valuesr>   r   r   _data_ndarrayr:   _cresorH   rU   r
   len
ValueError_is_monotonic_increasing_is_monotonic_decreasingis_monotonic)selfr7   s   &&r/   __init___FrequencyInferer.__init__   s    


 eX&& .$$**DK
 .enn.B.BCDK 5$xx# 3MM588$++! u:>GHH JJ//VV4::3V3V 	r1   c                   V ^8  d   QhRR/# r(   r+   znpt.NDArray[np.int64]r-   )r.   s   "r/   r0   rS      s     , ,- ,r1   c                	,    \        V P                  4      # N)r   rY   rb   s   &r/   deltas_FrequencyInferer.deltas   s    T]]++r1   c                   V ^8  d   QhRR/# rf   r-   )r.   s   "r/   r0   rS      s     . .2 .r1   c                	@    \        V P                  P                  4      # rh   )r   r7   rX   ri   s   &r/   deltas_asi8_FrequencyInferer.deltas_asi8   s     TZZ__--r1   c                   V ^8  d   QhRR/# r(   r+   boolr-   )r.   s   "r/   r0   rS      s     % %4 %r1   c                	2    \        V P                  4      ^8H  #    )r]   rj   ri   s   &r/   	is_unique_FrequencyInferer.is_unique   s    4;;1$$r1   c                   V ^8  d   QhRR/# rq   r-   )r.   s   "r/   r0   rS      s     * * *r1   c                	2    \        V P                  4      ^8H  # rt   )r]   rn   ri   s   &r/   is_unique_asi8 _FrequencyInferer.is_unique_asi8   s    4##$))r1   c                   V ^8  d   QhRR/# r(   r+   r,   r-   )r.   s   "r/   r0   rS      s     01 01* 01r1   c                n   V P                   '       d   V P                  P                  '       g   R# V P                  ^ ,          p\	        V P
                  4      pV'       d"   \        W4      '       d   V P                  4       # V P                  ^^.^^A.. RO39   d   R# V P                  '       g   R# V P                  ^ ,          pV^,          pV^<,          pV^<,          p\        W4      '       d   \        RW,          4      # \        W4      '       d   \        RW,          4      # \        W4      '       d   \        RW,          4      # \        WR,          4      '       d   \        RWR,          ,          4      # \        WR,          4      '       d   \        R	WR,          ,          4      # \        R
V4      # )zx
Find the appropriate frequency string to describe the inferred
frequency of self.i8values

Returns
-------
str or None
Nbhhminsi  msi@B usns)ru      A   )ra   r7   
_is_uniquerj   r	   r\   _is_multiple_infer_daily_rulehour_deltasrz   rn   _maybe_add_count)rb   deltappdpphppmppss   &     r/   rJ   _FrequencyInferer.get_freq   s\       

(=(=(=Adkk*\%--))++ B!R+>>
 """  #RiRiRi###C55%%%#E5;77%%%#C55%+//#D%$;*?@@%"244#D%)3C*DEE $D%00r1   c                   V ^8  d   QhRR/# r(   r+   z	list[int]r-   )r.   s   "r/   r0   rS     s     . .I .r1   c                	z    \        V P                  4      pV P                   Uu. uF  q"V,          NK  	  up# u upi rh   r	   r\   rj   )rb   r   xs   &  r/   
day_deltas_FrequencyInferer.day_deltas  s0    dkk*!%-AC---s   8c                   V ^8  d   QhRR/# r   r-   )r.   s   "r/   r0   rS   "  s     . .Y .r1   c                	    \        V P                  4      ^,          pV P                   Uu. uF  q"V,          NK  	  up# u upi )   r   )rb   r   r   s   &  r/   r   _FrequencyInferer.hour_deltas!  s5    dkk*b0!%-AC---s   ?c                   V ^8  d   QhRR/# )r(   r+   z
np.ndarrayr-   )r.   s   "r/   r0   rS   '  s     C C
 Cr1   c                	D    \        V P                  V P                  R 7      # )rV   )r   rY   r\   ri   s   &r/   fields_FrequencyInferer.fields&  s    !$--dkkBBr1   c                   V ^8  d   QhRR/# )r(   r+   r   r-   )r.   s   "r/   r0   rS   +  s     A A9 Ar1   c                	f    \        V P                  ^ ,          V P                  P                  R7      # )r   )unit)r   rY   r7   r   ri   s   &r/   	rep_stamp_FrequencyInferer.rep_stamp*  s     q)

@@r1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS   .  s     G Gj Gr1   c                	V    \        V P                  V P                  P                  4      # rh   )r   r   r7   	dayofweekri   s   &r/   r   &_FrequencyInferer.month_position_check.  s    #DKK1E1EFFr1   c                   V ^8  d   QhRR/# rf   r-   )r.   s   "r/   r0   rS   2  s     3 3- 3r1   c                	    V P                   R ,          ^,          V P                   R,          ,           p\        VP                  R4      4      # )YMi8)r   r   astype)rb   nmonthss   & r/   mdiffs_FrequencyInferer.mdiffs1  s7    ++c"R'$++c*::W^^D122r1   c                   V ^8  d   QhRR/# rf   r-   )r.   s   "r/   r0   rS   7  s     < <- <r1   c                	X    \        V P                  R ,          P                  R4      4      # )r   r   )r   r   r   ri   s   &r/   ydiffs_FrequencyInferer.ydiffs6  s!    T[[-44T:;;r1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS   :  s      : r1   c                	   V P                  4       pV'       dG   V P                  ^ ,          p\        V P                  P                  ,          pV RV 2p\        WB4      # V P                  4       pV'       dc   V P                  ^ ,          ^,          p^ ^^^^^
/p\        WpP                  P                  ^,          ,          ,          pV RV 2p\        WF4      # V P                  4       pV'       d   \        WP                  ^ ,          4      # V P                  '       d   V P                  4       # V P                  4       '       d   R# V P                  4       p	V	'       d   V	# R# )r   r%   BN)_get_annual_ruler   r   r   monthr   _get_quarterly_ruler   _get_monthly_rulerv   _get_daily_rule_is_business_daily_get_wom_rule)
rb   annual_rulenyearsr   aliasquarterly_rule	nquartersmod_dictmonthly_rulewom_rules
   &         r/   r   #_FrequencyInferer._infer_daily_rule:  s#   ++-[[^F!$.."6"67E"m1UG,E#E22113A*I2q"a,H!(>>+?+?!+C"DEE%&aw/E#E55--/#L++a.AA>>>''))""$$%%'Or1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS   Z  s     	/ 	/ 	/r1   c                	   \        V P                  4      pV P                  ^ ,          V,          pV^,          ^ 8X  d=   \        V P                  P                  4       ,          pRV 2p\        WB^,          4      # \        RV4      # )r   r&   D)r	   r\   rj   r   r   weekdayr   )rb   r   dayswdr   s   &    r/   r   !_FrequencyInferer._get_daily_ruleZ  sk    dkk*{{1~#!8q= 6 6 89BIE#E!844#C..r1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS   e  s     U U* Ur1   c                	    \        V P                  4      ^8  d   R# \        \        V P                  R,          4      4      ^8  d   R# V P	                  4       pVf   R# RRRRRRR	R
/P                  V4      # )ru   Nr   csYSbsBYSceYEbeBYE)r]   r   r   r   r   r3   rb   	pos_checks   & r/   r   "_FrequencyInferer._get_annual_rulee  sm    t{{avdkk#&'(1,--/	$eT4uEII)TTr1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS   s  s     U UZ Ur1   c                	    \        V P                  4      ^8  d   R# V P                  ^ ,          ^,          ^ 8X  g   R# V P                  4       pVf   R# RRRRRRRR	/P                  V4      # )
ru   Nr   QSr   BQSr   QEr   BQEr]   r   r   r3   r   s   & r/   r   %_FrequencyInferer._get_quarterly_rules  sg    t{{a{{1~!Q&--/	$eT4uEII)TTr1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS     s     U U: Ur1   c                	    \        V P                  4      ^8  d   R# V P                  4       pVf   R# RRRRRRRR	/P                  V4      # )
ru   Nr   MSr   BMSr   MEr   BMEr   r   s   & r/   r   #_FrequencyInferer._get_monthly_rule  sO    t{{a--/	$eT4uEII)TTr1   c                   V ^8  d   QhRR/# rq   r-   )r.   s   "r/   r0   rS     s     
 
D 
r1   c                	   V P                   ^^.8w  d   R# V P                  ^ ,          P                  4       p\        P                  ! V P
                  4      p\        V P                  4      p\        P                  ! W#4      p\        P                  ! V\        P                  ! V4      ,           ^4      p\        \        P                  ! V^ 8H  V^8H  ,          V^ 8  V^8*  ,          V^8H  ,          ,          4      4      # )ru   F)r   r7   r   npdiffrY   r	   r\   floor_dividemodcumsumrr   all)rb   first_weekdayshiftsr   weekdayss   &    r/   r   $_FrequencyInferer._is_business_daily  s    ??q!f$ 

1--/'dkk*-66-"))F*;;Q?FFa-FaK0qLX]3v{CE
 	
r1   c                   V ^8  d   QhRR/# r}   r-   )r.   s   "r/   r0   rS     s     ! !z !r1   c                	n   \        V P                  P                  4      p\        V4      ^8  d   R# \        V P                  P                  ^,
          ^,          4      pW"^8  ,          p\        V4      ^ 8X  g   \        V4      ^8  d   R# V^ ,          ^,           p\
        V^ ,          ,          pRV V 2# )ru   NzWOM-)r   r7   r   r]   dayr   )rb   r   week_of_monthsweekr   s   &    r/   r   _FrequencyInferer._get_wom_rule  s    $**,,-x=1!!3 9:'(:;~!#s>':Q'> a 1$HQK(dVB4  r1   )r\   rY   r7   ra   N)__name__
__module____qualname____firstlineno____doc__rc   r   rj   rn   rv   rz   rJ   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r-   r1   r/   rK   rK      s   
> , , . .
 % % * *01d . . . . C C A AG 3 3 < <@	/UUU
&! !r1   rK   c                      ] tR tRtR tRtR# )rI   i  c                	J    V P                   '       d   V P                  4       # R # rh   )rv   r   ri   s   &r/   r   ,_TimedeltaFrequencyInferer._infer_daily_rule  s    >>>'')) r1   r-   N)r   r  r  r  r   r  r-   r1   r/   rI   rI     s    *r1   rI   c                    V ^8  d   QhRRRR/# )r(   multintr+   rr   r-   )r.   s   "r/   r0   r0     s      3 4 r1   c                    W,          ^ 8H  # )r   r-   )r   r
  s   &&r/   r   r     s    9>r1   c               $    V ^8  d   QhRRRRRR/# )r(   baser*   countfloatr+   r-   )r.   s   "r/   r0   r0     s!      3 u  r1   c                Z    V^8w  d$   V\        V4      8X  g   Q h\        V4      pV V  2# V # rt   )r  )r  r  s   &&r/   r   r     s8    zE
"""E
r1   c                   V ^8  d   QhRR/# rq   r-   )r.   s   "r/   r0   r0     s     4 4D 4r1   c                >   Ve   V f   R# \        V 4      p \        V4      p\        V4      '       d5   \        V 4      '       d   \        \	        V 4      \	        V4      4      # V R9   # \        V4      '       d   V R9   # \        V4      '       d   V R9   # \        V4      '       d   WRRRRRRRR	R
0
9   # VR8X  d   V R9   # VR8X  d   V R9   # VR8X  d   V R9   # VR8X  d   V R9   # VR8X  d   V R9   # VR8X  d   V R9   # VR8X  d   V R9   # VR	8X  d   V R9   # VR
8X  d   V R9   # R# )z
Returns True if downsampling is possible between source and target
frequencies

Parameters
----------
source : str or DateOffset
    Frequency converting from
target : str or DateOffset
    Frequency converting to

Returns
-------
bool
Fr   Cr   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   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   )_maybe_coerce_freq
_is_annual_is_quarterly_quarter_months_conformr   _is_monthly
_is_weekly)sourcetargets   &&r/   is_subperiodr    sg     ~'F'F&  *v&v(>  PPP	v		PPP	V		KKK	F		#sCeS$dSSS	3AAA	3AAA	3AAA	3<<<	5777	3000	4+++	4%%	4r1   c                   V ^8  d   QhRR/# rq   r-   )r.   s   "r/   r0   r0     s     7 7d 7r1   c                   Ve   V f   R# \        V 4      p \        V4      p\        V 4      '       d`   \        V4      '       d   \        V 4      \        V4      8H  # \        V4      '       d"   \        V 4      p\        V4      p\	        W#4      # VR9   # \        V 4      '       d   VR9   # \        V 4      '       d   VR9   # \        V 4      '       d   WRRRRRRRR	R
0
9   # V R8X  d   VR9   # V R8X  d   VR9   # V R8X  d   VR9   # V R8X  d   VR9   # V R8X  d   VR9   # V R8X  d   VR9   # V R8X  d   VR9   # V R	8X  d   VR9   # V R
8X  d   VR9   # R# )z
Returns True if upsampling is possible between source and target
frequencies

Parameters
----------
source : str or DateOffset
    Frequency converting from
target : str or DateOffset
    Frequency converting to

Returns
-------
bool
Fr   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   r   r   r   r   >   r   r   r   r   >   r   r   r   >   r   r   >   r   )r  r  r   r  r  r  r  )r  r  smonthtmonths   &&  r/   is_superperiodr"    s     ~'F'F&f!&)^F-CCC  #F+F#F+F*6::PPP	v		PPP	V		KKK	F		#sCeS$dSSS	3KKK	3KKK	3KKK	3<<<	5777	3000	4+++	4%%	4r1   c                   V ^8  d   QhRR/# )r(   r+   r*   r-   )r.   s   "r/   r0   r0   8  s       r1   c                    V f   Q h\        V \        4      '       d)   \        \        V P                  4      4      P
                  p V R9   d   V # V P                  4       # )zwe might need to coerce a code to a rule_code
and uppercase it

Parameters
----------
source : str or DateOffset
    Frequency converting from

Returns
-------
str
>   r   r   r   r   r   r   )r>   r   r   r   name_freqstrupper)codes   &r/   r  r  8  sP     $
##9TYY/09922zz|r1   c               $    V ^8  d   QhRRRRRR/# )r(   r  r*   r  r+   rr   r-   )r.   s   "r/   r0   r0   N  s!        C      r1   c                \    \         V ,          p\         V,          pV^,          V^,          8H  # )   )r   )r  r  snumtnums   &&  r/   r  r  N  s)     D D!8taxr1   c                    V ^8  d   QhRRRR/# r(   ruler*   r+   rr   r-   )r.   s   "r/   r0   r0   T       0 0S 0T 0r1   c                ^    V P                  4       p V R 8H  ;'       g    V P                  R4      # )r   zY-r'  
startswithr0  s   &r/   r  r  T  (    ::<D3;//$//$//r1   c                    V ^8  d   QhRRRR/# r/  r-   )r.   s   "r/   r0   r0   Y  s     8 8 8 8r1   c                ^    V P                  4       p V R 8H  ;'       g    V P                  R4      # )Q)zQ-BQr3  r5  s   &r/   r  r  Y  s(    ::<D3;77$//,77r1   c                    V ^8  d   QhRRRR/# r/  r-   )r.   s   "r/   r0   r0   ^  s      c d r1   c                ,    V P                  4       p V R9   # )r   )r   BM)r'  r5  s   &r/   r  r  ^  s    ::<D;r1   c                    V ^8  d   QhRRRR/# r/  r-   )r.   s   "r/   r0   r0   c  r1  r1   c                ^    V P                  4       p V R 8H  ;'       g    V P                  R4      # )Wr&   r3  r5  s   &r/   r  r  c  r6  r1   )r   r   r   r   r   r   )r   r9  )r   r4   rO   r  r"  r   )K
__future__r   typingr   numpyr   pandas._libsr   pandas._libs.algosr   pandas._libs.tslibsr   r   r	   r
   pandas._libs.tslibs.ccalendarr   r   r   r   r   pandas._libs.tslibs.dtypesr   pandas._libs.tslibs.fieldsr   r   pandas._libs.tslibs.offsetsr   r   r   pandas._libs.tslibs.parsingr   pandas.util._decoratorsr   r   pandas.core.dtypes.commonr   pandas.core.dtypes.dtypesr   r   r   pandas.core.dtypes.genericr   r   pandas.core.algorithmsr   pandas._typingr    r5   r!   r"   r#   pandas.core.arrays.datetimeliker$   _need_suffix_prefix_mkey_alias_dr4   rO   rK   rI   r   r   r  r"  r  r  r  r  r  r  __all__r-   r1   r/   <module>rZ     s{   "     ,   @ 
 7
 7 

 *" 
 G 8G	2$(@(I %  
 G9AbT"+1 (  
 B,.rd)r"Y' : HV Vry! y!x*!2 *4n7t, 0
8

0
r1   