+
    xȇi                     f   ^ RI Ht ^ RIt^ RIt^ RIHu Ht ^ RI	t
^ RI	HtHt ^ RIHt ^ RIHt R tR tR tR tR	 tR
 tR tR tR t]P6                  P9                  R. RO4      R 4       t]P6                  P9                  RRR.4      R 4       tR tR t ]PB                  ! R4      R 4       t"R# )    )	timedeltaN)	DataFrameSeries)timedelta_rangec            
      *   \        ^^.\        4       \        ^R7      .R7      p V P                  R4      P                  4       p\        ^\        P
                  \        P
                  ^.\        R^RRR7      R7      p\        P                  ! W4       R# )   )minutesdataindex1min0 dayus)periodsfrequnitN)	r   r   resampleasfreqnpnanr   tmassert_frame_equal)dfresultexpecteds      t/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/resample/test_timedelta.pytest_asfreq_bugr      sq    	Ay{Ia4H&I	JB[[ '')F#gqvDIH &+    c            	      2   \         P                  ! R \         P                  R.4      p \        R. R
O/V 4      P	                  R4      P                  4       p\        RR\        P                  R./\        R^RR7      R7      p\        P                  ! W4       R	# )0s2svalue1sg      @g      @r   r   r   r   N)         )pdto_timedeltaNaTr   r   meanr   r   r   r   r   )r   r   r   s      r   test_resample_with_natr-      sy    OOT266401E+U3<<TBGGIF	3$%gqt<H &+r   c            	      d   \        R RRR7      p \        R. RO/V R7      pVP                  R4      P                  4       pR^\        P
                  \        P
                  \        P
                  \        P
                  ^
./p\        V\        R RRR7      R7      p\        P                  ! W$4       R# )	z00:00:00z00:10:005minr   r"   r
   2minN)r   r(   
   )r   r   r   r   r   r   r   r   )r   r   r   expected_datar   s        r   $test_resample_as_freq_with_subperiodr4   &   s    J
@E	*-U	;B[[ '')Fq"&&"&&"&&"&&"EFM/*jv"VH &+r   c                  z   \        R \        P                  ! R4      /4      p V P                  V P                  ^,          4      P                  4       p \        RR^2R7      V n        \        R \        P                  ! R4      /\        P                  ! \        P                  ! R4      RR7      P                  R4      R7      pVP                  R4      P                  4       p\        P                  ! W 4       VR ,          pVP                  R4      P                  4       p\        P                  ! W R ,          4       R	# )
Ai  z0 days30minr   r   minr   r   r%   N)r   r   arangegroupbyr   sumr   r)   r*   as_unitr   r   r   assert_series_equal)r   r   r   ss       r   test_resample_with_timedeltasrA   2   s    #ryy/0H" 4599;H$XGRHHN		biiooobiioE:BB4H
B [[!%%'F&+
3AZZ $$&F6C=1r   c            	          \        \        \        ^4      4      \        RR^R7      R7      p V P	                  R4      P                  4       p\        . RO\        RR^R7      R7      p\        P                  ! W4       R# )r(   1 dayr@   r8   r%   r!   N)r   r(      )r   listranger   r   r=   r   r?   )r@   r   r   s      r   %test_resample_single_period_timedeltarG   D   s[    tE!H~_W3PQ%RSAZZ!!#FiwTST'UVH6,r   c                      \        R ^	RR7      p \        \        ^	4      V R7      pVP                  R4      P	                  4       pVP                  \        4      p\        P                  ! W#4       R# )010msr$   r%   N)	r   r   rF   r   r,   astypefloatr   r?   )r   seriesr   r   s       r   #test_resample_timedelta_idempotencyrN   K   sS    C8EE!HE*F__V$))+F}}U#H6,r   c                     \        R ^RR7      p \        \        P                  P	                  ^4      P                  \        V 4      4      V R7      pVP                  RRR7      P                  4       pVP                  R4      P                  4       p\        R RRR7      p\        RR	RR7      p\        P                  ! VP                  V4       \        P                  ! VP                  V4       R
# )r    r@   startr   r   r%   r!   5s)offset25srQ   endr   29sN)r   r   r   randomdefault_rngstandard_normallenr   r,   r   assert_index_equalr   )rngts	with_basewithout_baseexp_without_baseexp_with_bases         r   (test_resample_offset_with_timedeltaindexrc   T   s    
bs
;C			%%a(88SB#	NBD.335I;;t$))+L&Tu4H#$EEM,,,.>?)//=9r   c            
         \        R R/\        P                  ! \        \	        ^4      4      RR7      R7      p V R ,          P                  R4      V R&   V P                  R4      P                  R 4      p\        P                  ! \        P                  ! ^ ^
.R	R
7      RR7      p\        R RR.RRR./VR7      pVP                  R R.^R7      pVR ,          P                  R4      VR&   \        P                  ! W4       R# )	Group_objr6   r@   r:   r%   categoryGroup10sc                 D    V P                  4       P                  ^ ,          # )r   )value_countsr   xs   &r   <lambda>Dtest_resample_categorical_data_with_timedeltaindex.<locals>.<lambda>g   s    q~~/?/E/Ea/Hr   zm8[s]dtyper0   )axisN)r   r)   r*   rE   rF   rK   r   aggTimedeltaIndexr   arrayreindexr   r   )r   r   exp_tdir   s       r   2test_resample_categorical_data_with_timedeltaindexrw   c   s    	K%R__T%)_SV-W	XB[/((4BwK[[##$IJF!R @uMG	sCj'C:6H g 6Q?H -44Z@HW&+r   c                     \        R RRR7      p \        RV /V R7      p\        R RRR7      p\        W"RR7      p\        P                  VP
                  ^&   VP                  R4      P                  4       R,          p\        P                  ! WC4       VR,          P                  R4      P                  4       p\        P                  ! WC4       R# )	rC   z6 day4Dr0   timer%   2D)r   nameN)
r   r   r   r)   r+   ilocr   firstr   r?   )timesr   times2express        r   test_resample_timedelta_valuesr   r   s    
 GW48E	FE?%	0BWgD9F
F
3C&&CHHQK
++d

!
!
#F
+C3$
V*

d
#
)
)
+C3$r   zstart, end, freq, resample_freqc                    \        WVR 7      p\        \        P                  ! \	        V4      4      VR7      pVP                  V4      P                  4       p\        W0VR7      p\        P                  ! VP                  V4       VP                  P                  VP                  8X  g   Q h\        P                  ! VP                  R,          4      '       d   Q hR# )rU   r%   )r   rQ   rV   N)r   r   r   r;   r[   r   r9   r   r\   r   r   isnanr}   )rQ   rV   r   resample_freqidxr@   r   expected_indexs   &&&&    r   !test_resample_timedelta_edge_caser      s      T
:CryyS"#.AZZ&**,F$-#NN&,,7<< 3 3333xxB(((((r   
duplicatesTFc           
         \        \        P                  P                  ^4      P	                  RR7      \        RRRR7      R7      pV '       d
   . ROVn        VP                  R,          P                  R4      P                  R 4      p\        R	.^,          .^,          R
.^,          .,           \        R^RRR7      R7      pVP                  Vn        \        P                  ! W#4       R# )r&   '  )sizer    	3906250nsrP   r%   3sc                     \        V 4      # )N)r[   rk   s   &r   rm   Etest_resample_with_timedelta_yields_no_empty_groups.<locals>.<lambda>   s    SVr   i   i  r#   ns)rQ   r   r   r   N)r   rD   )r6   Br6   C):z1sNN:NNN)r   r   rX   rY   normalr   columnslocr   applyr   r   )r   r   r   r   s   &   r   3test_resample_with_timedelta_yields_no_empty_groupsr      s     

		a ''Z'8D%kJ
B )
VVH&&t,223CDF
bSEAI;&D"4dKH zzH&+r   c           
      $   \         P                  ! R V  R24      p\        R\        P                  ! \         P
                  ! ^4      RR7      P                  V4      /\        P                  ! R^RR7      R7      pVP                  R	4      P                  R
4      p\        R\        P                  ! R4      \        P                  ! R4      ./\        P                  ! R^RR	R7      R7      P                  V4      p\        P                  ! W44       R# )zm8[]r"   r@   r:   20200101UTC)r   tzr%   r{   gGz?z0 days 00:00:00.990000z0 days 00:00:02.990000)r   r   r   N)r   rp   r   r)   r*   r;   rK   
date_ranger   quantile	Timedeltar   r   )r   rp   r   r   r   s   &    r    test_resample_quantile_timedeltar      s    HHs4&]#E		"//"))A,S9@@GHmmJe<
B [[''-F5656	
 mmJe$G fUm  &+r   c                     \         P                  ! \        ^
4       U u. uF(  p \         P                  ! ^xV ^,          ,           R7      NK*  	  up 4      p\	        \        ^
4      VR7      pVP                  RRRR7      P                  4       p\	        . RO\         P                  ! \        ^4       U u. uF(  p \         P                  ! ^xV ^<,          ,           R7      NK*  	  up RR7      R7      p\        P                  ! W44       R# u up i u up i )	r2   )secondsr%   r9   right)closedlabelr0   N)r   r'            	   )
r)   IndexrF   r   r   r   r=   rs   r   r?   )ir   serr   r   s        r   test_resample_closed_rightr      s    
((b	J	1BLLq2v6	J
KC
r#
&C\\%w\?CCEF9>qBAR\\#B,/B
H 6, K Cs   .D0.D	pyarrowc                     \         P                  ! \        R ^R7      RR7      p \        \        P
                  ! ^\        P                  R7      V R7      pVP                  R4      P                  4       p\        P                  ! W!4       R# )rC   )r   zduration[ns][pyarrow]ro   r%   1DN)r)   r   r   r   r   r;   float64r   r,   r   r?   )r   r   r   s      r   test_arrow_duration_resampler      s^     ((?7A6>U
VCbii4C@Ht$))+F6,r   ))8h21h59min50srh   3h)r   22h1h5h)527D5006D3D10D)r   r   r   r{   )r   r   rh   2h)0hr   rh   r   )r   85DDr{   )#datetimer   numpyr   pytestpandas.util._test_decoratorsutil_test_decoratorstdpandasr)   r   r   pandas._testing_testingr   pandas.core.indexes.timedeltasr   r   r-   r4   rA   rG   rN   rc   rw   r   markparametrizer   r   r   r   
skip_if_nor    r   r   <module>r      s       ) )   :,,	,2$--:,%$ %		)	) e}5, 6,(,(- y- -r   