+
    yȇi).                     J   ^ RI t^ RI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 ^ RIHt R tR tR tR tR tR	 tR
 tR tR t]P8                  P;                  RRR.4      R 4       tR tR t ]P8                  P;                  RR^]PB                  ]PB                  ]PB                  ]PB                  .. RO. RO]PB                  ]PB                  ]PB                  ]PB                  .. RO. RO. RO.3RR. RO. RO. R O. R!O. RO. R"O. R#O.3.4      R 4       t"R t#R t$R t%R# )$    N)	DataErrorSpecificationError)		DataFrameIndex
MultiIndexPeriodSeries	Timestampconcat
date_rangetimedelta_rangec                 H   \        \        P                  P                  ^4      P	                  R4      4      pVP                  ^V R7      p\        P                  ! VP                  P                  VRRV 1,          P                  4       VP                  ^V R7      ^,          pVP                  P                  VRRV 1,          P                  ^,          8X  g   Q hVP                  ^V R7      R,          p\        P                  ! VP                  P                  VRRV 1,          P                  ^^.,          4       VP                  ^V R7      ^^.,          p\        P                  ! VP                  P                  VRRV 1,          P                  ^^.,          4       R# )   windowstepN)   r   )      )r   nprandomdefault_rngstandard_normalrollingtmassert_index_equal_selected_objcolumnsname)r   framers   &  l/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/window/test_api.pytest_getitemr#      s8   bii++A.>>vFGEQT*A!//1154=3H3HIQT*1-A??54=#8#8#;;;; 	QT*40A!//1154=3H3H!Q3PQQT*Aq62A!//1154=3H3H!Q3PQ    c                  z   \        ^^..RR.R7      p V P                  ^R7      p\        P                  ! \        RR7      ;_uu_ 4        VR.,           RRR4       \        P                  ! \        R	R7      ;_uu_ 4        VRR.,           RRR4       R#   + '       g   i     LJ; i  + '       g   i     R# ; i)
r   ABr   r   zColumns not found: 'C'matchCNz^[^A]+$)r   r   pytestraisesKeyError)dfgs     r"   test_select_bad_colsr2   '   s    	QF8c3Z	0B


!
A	x'?	@	@	3% 
A	xy	1	1 	
3* 
2	1 
A	@	1	1	1s   	B B)B&	)B:	c                  t   \        ^^..RR.R7      p V P                  ^R7      p\        P                  ! VP                  P                  4       VR,          P                  4       4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                   RRR4       R#   + '       g   i     R# ; i)r   r&   r'   r(   r)   z%'Rolling' object has no attribute 'F'r*   N)
r   r   r   assert_series_equalr&   sumr-   r.   AttributeErrorF)r0   r!   msgs      r"   test_attribute_accessr9   2   sx    	QF8c3Z	0B


!
A133779afjjl3
1C	~S	1	1	 
2	1	1	1s   B&&B7	c           
         \        R \        ^4      R\        ^^
4      RR/4      pVP                  ^V R7      pVR R.,          P                  4       p\        R \        P
                  \        P
                  ^^^	.R\        P
                  \        P
                  ^^^./\        R4      R7      RRV 1,          p\        P                  ! W44       R# )r&   r'   r,   foor   ABr(   N)	r   ranger   r5   r   nanlistr   assert_frame_equalr   r0   r!   resultexpecteds   &    r"   tests_skip_nuisancerD   ;   s    	Cq3ac5A	BB


!$
'ASz] F	rvvrvvq!Q'rvvrvvr2r.JKT
 fH &+r$   c           	         \        R \        ^4      R\        ^^
4      RR/4      pVP                  ^V R7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     R# ; i)r&   r'   r,   r;   r   z-Cannot aggregate non-numeric type: object|strr*   N)r   r=   r   r-   r.   r   r5   )r   r0   r!   s   &  r"   test_sum_object_str_raisesrF   F   sl    	Cq3ac5A	BB


!$
'A	H
 
 	
	
 
 
 
s   A77B	c                     \        R \        ^4      R\        ^ ^
^4      /4      pVP                  ^V R7      pVR ,          P                  4       pVR ,          P	                  4       pVR ,          P                  4       pVR,          P                  4       pVR,          P	                  4       pVP                  \        P                  R .4      p\        W4Wg.^R7      p	\        P                  ! R R.RR..4      V	n        \        P                  ! W4       VP                  R \        P                  RR /4      p\        W7.^R7      p	\        P                  ! WRR	7       VP                  R RR
./4      p\        W4.^R7      p	\        P                  ! RR.4      V	n        \        P                  ! W4       VR ,          P                  RR.4      p\        W5.^R7      p	RR.V	n        \        P                  ! W4       Rp
\        P                   ! \"        V
R7      ;_uu_ 4        VP                  R RRRR//4       RRR4       \        P                   ! \"        V
R7      ;_uu_ 4        VP                  R RRRR/RRRRR//4       RRR4       VP                  R RR
.RRR
./4      p\        W4Wg.^R7      p	. ROp\        P                  ! V4      V	n        \        P                  ! WRR	7       R#   + '       g   i     L; i  + '       g   i     L; i)r&   r'   r   c                 2    \         P                  ! V ^R7      # r   )ddofr   stdxs   &r"   <lambda>test_agg.<locals>.<lambda>Z   s    RVVAA->r$   axismeanz<lambda>c                 2    \         P                  ! V ^R7      # rI   rK   rM   s   &r"   rO   rP   _   s    rvvaa7Hr$   T
check_likerL   r5   nested renamer is not supportedr*   Nmean2sum2r&   rS   r&   rL   )rZ   r[   )r'   rS   )r'   rL   )r   r=   r   rS   rL   r5   	aggregater   r   r   from_productr   r   r@   from_tuplesr-   r.   r   )r   r0   r!   a_meana_stda_sumb_meanb_stdrB   rC   r8   exp_colss   &           r"   test_aggre   P   s   	Cq3aQ8	9B


!$
'AsV[[]FcFJJLEcFJJLEsV[[]FcFJJLE[["''#>?@Fvf41=H!..c
VZ<P/QRH&+[[#rww-HIJFvoA.H&t<[[#/0FvoA.H!--}l.KLH&+sVvuo.FvoA.HH&+
+C	)	5	5	S665%89: 
6 
)	5	5	665%0#QV7WX	
 
6
 [[#fe_EFFvf41=HIH!--h7H&t< 
6	5 
6	5s   K*#K=*K:	=L	c           
      h   \        R \        ^4      R\        ^ ^
^4      /4      pVP                  ^R7      pVR ,          P                  4       pVP	                  R \
        P                  RR /4      pVR,          P                  R V R7      p\        W5.^R7      p\        P                  ! WFRR7       R	# )
r&   r'   r)   c                 2    \         P                  ! V ^R7      # rI   rK   rM   s   &r"   rO    test_agg_apply.<locals>.<lambda>   s    qq0Ar$   c                 2    \         P                  ! V ^R7      # rI   rK   rM   s   &r"   rO   rh      s    RVVAA%6r$   )rawrQ   TrU   N)
r   r=   r   r5   aggr   applyr   r   r@   )rj   r0   r!   ra   rB   rcustomrC   s   &      r"   test_agg_applyrn      s    	Cq3aQ8	9B


!
AcFJJLEUUC&ABCFfll6Cl@Gu&Q/H&t<r$   c           
         \        R \        ^4      R\        ^ ^
^4      /4      pVP                  ^V R7      pVP                  \        P
                  \        P                  .4      P                  p\        P                  ! \        R4      RR..4      p\        P                  ! W44       VR ,          P                  \        P
                  \        P                  .4      P                  p\        RR.4      p\        P                  ! W44       VP                  R \        P
                  \        P                  ./4      P                  p\        P                  ! RR.4      p\        P                  ! W44       R# )	r&   r'   r   r<   r5   rS   N)r&   r5   rZ   )r   r=   r   rk   r   r5   rS   r   r   r]   r?   r   r   r   r^   rA   s   &    r"   test_agg_consistencyrp      s	   	Cq3aQ8	9B


!$
'AUUBFFBGG$%--F&&T
UFO'DEH&+sVZZ)*22FeV_%H&+UUC"&&"''*+,44F%%|]&CDH&+r$   c            
         \        R \        ^4      R\        ^ ^
^4      /4      p V P                  ^R7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  RR RR./RRRR.//4       R	R	R	4       \        VR ,          P                  4       VR ,          P                  4       VR,          P                  4       VR,          P                  4       .^R
7      p\        P                  ! . RO4      Vn        \        P                  ! \
        VR7      ;_uu_ 4        VR R.,          P                  R RRR./RRRR.//4       R	R	R	4       \        P                  ! \
        VR7      ;_uu_ 4        VP                  R RRR./RRRR.//4       R	R	R	4       R	#   + '       g   i     EL2; i  + '       g   i     Lp; i  + '       g   i     R	# ; i)r&   r'   r)   rW   r*   r1rS   r5   r2NrQ   rarL   rb))rt   rS   )rt   rL   )ru   rS   )ru   rL   )r   r=   r   r-   r.   r   r\   r   rS   rL   r   r^   r   rk   )r0   r!   r8   rC   s       r"   test_agg_nested_dictsrv      s|   	Cq3aQ8	9B


!
A
+C	)	5	5	TC&%14#9OPQ 
6 	
3#

afkkmQsVZZ\BH "--FH 
)	5	5	3*3 7tfe_>UVW 
6 
)	5	5	sTFE?+S4&%2IJK 
6	5 
6	5	5 
6	5 
6	5	5s$   F#('F7;G
#F4	7G	
G	zfunc,window_sizer   	expandingc                 <   \        R \        P                  P                  ^4      P	                  ^
4      R\        P                  P                  ^4      P	                  ^
4      /4      p\        W 4      ! V4      pVP                  4       VP                  4       ,
          pVP                  R 4      p\        P                  ! WT4       VP                  4       ^VP                  4       ,          ,
          pVP                  R ^R7      p\        P                  ! WT4       R# )r'   r,   c                 L    V P                  4       V P                  4       ,
          # N)maxrS   rM   s   &r"   rO   test_pipe.<locals>.<lambda>   s    aeeg0r$   c                 X    V P                  4       WP                  4       ,          ,
          # rz   )r{   min)rN   ks   &&r"   rO   r|      s    1uuw;!6r$   )r   N)r   r   r   r   r   getattrr{   rS   piper   r@   r~   )funcwindow_sizer0   r!   rC   rB   s   &&    r"   	test_piper      s     
&&q)99"=&&q)99"=	

B 	+&Auuw!HVV01F&+uuwQUUW$HVV6!V<F&+r$   c                 z   . ROp\        R4      \        R4      \        R4      .p\        R . ROR. ROR\        R4      R\        R^R7      R\	        R^RR7      R\        R4      \        R4      \        R4      .RRR\        P                  .RRR\        P                  .RRR\        P                  .R	VR
\        R4      \        R4      \        R4      ./VR7      p\        R . R OR. R OR. R OR. R OR. R OR. R OR. R OR. R!OR. R!OR	. R!OR
. R!O/VR7      RRV 1,          pVP                  ^^ V R7      P                  4       p\        P                  ! WT4       VP                  ^^ V R7      P                  4       pVP                  4       P                  \        4      RRV 1,          p\        P                  ! WT4       R# )"intfloatstringdatetime	timedeltaperiodsfl_inffl_nanstr_nandt_natperiods_nat2017010120170203Nabc)r   z1 ss)r   freqz2012-01z2012-02z2012-03      ?       @aabbr(   r   min_periodsr   )r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )g      @g      @g      @)r   r   r   )r   r   r   )r
   r   r?   r   r   r   r   infr>   r   countr   r@   notnaastyper   )r   cols
dt_nat_colr0   rC   rB   s   &     r"   test_count_nonnumeric_typesr      s   D J':)>	$PJ	9_d5k
:q9Dy!y!y!
 sC(sC(dBFF+jy!y!t	
* -
B2 ?_oooo?	
  fH" ZZqadZ;AACF&+ZZqtZ4::<Fxxz  '$/H&+r$   c                     \        \        P                  ! ^d4      RR7      p V P                  ^4      P	                  4       pV P                  ^4      P	                  4       pVP
                  R8X  g   Q hVP
                  R8X  g   Q hR# )d   r;   )r   N)r	   r   aranger   r5   r   )r   s2s3s      r"   test_preserve_metadatar     sf    ryy~E*A	
2			B	
2			B77e77er$   zfunc,window_size,expected_valsc           
         \        . RO. RO. RO. RO. RO. RO. RO.. ROR7      p\        VP                  R4      V 4      pV'       d
   V! V4      pMV! 4       p\        P                  ! . RORR.R7      p\        P                  ! . RO4      p\        W&VR
7      pVP                  RRR.RRR	./4      p	\        P                  ! W4       R# )r&   stocklowhighr(   N)namesrS   r{   r~   )indexr   )r&   
      )r&   r      )r&   r   (   )r'   r   r   )r'   r   r   )r'   r   P   )r'   r   Z   )r   r   r   ))r&   r   )r&   r   )r&   r   )r'   r   )r'      )r'   r   )r'      ))r   rS   )r   r{   )r   rS   )r   r~   )r   r   groupbyr   r^   rk   r   r@   )
r   r   expected_valsr0   fr   r   r   rC   rB   s
   &&&       r"   test_multiple_agg_funcsr   !  s    B 
	
 )
B 	

7#T*A;""NoE $$LG WEHZZ&%IJF&+r$   c                 &   \        \        ^4      4      P                  ^W!W4R7      pVP                   Uu/ uF  qf\	        WV4      bK  	  pp\	        WP4      ! 4        VP                   Uu/ uF  qf\	        WV4      bK  	  ppW8X  g   Q hR# u upi u upi )r   )centerclosedr   r   N)r	   r=   r   _attributesr   )	arithmetic_win_operatorsr   r   r   r   roll_objattrrC   rB   s	   &&&&&    r"   )test_dont_modify_attributes_after_methodsr   c  s     eAh''	&[ ( H ;C:N:NO:N$gh--:NHOH/18@8L8LM8LGH++8LFM PMs   B	)Bc                    \        . RO4      pVP                  ^d^V R7      P                  4       p\        \        P                  ! \        V4      4      4      RRV 1,          p\        P                  ! W#4       Rp\        P                  ! \        VR7      ;_uu_ 4        \        . RO4      P                  ^^V R7      P                  4        RRR4       R#   + '       g   i     R# ; i)r   r   N!min_periods 5 must be <= window 3r*   r   r   r   r   r   r   )r	   r   r~   r   oneslenr   r4   r-   r.   
ValueErrorr   arB   rC   r8   s   &    r"   test_rolling_min_min_periodsr   p  s    AYYcqtY<@@BFbggc!fo&vv.H6,
-C	z	-	-y!!!EIIK 
.	-	-	-s   .CC'	c                    \        . RO\        P                  R7      pVP                  ^d^V R7      P	                  4       pVRRV 1,          p\
        P                  ! W#4       Rp\        P                  ! \        VR7      ;_uu_ 4        \        . RO4      P                  ^^V R7      P	                  4        RRR4       R#   + '       g   i     R# ; i)r   )dtyper   Nr   r*   r   r   )
r	   r   float64r   r{   r   assert_almost_equalr-   r.   r   r   s   &    r"   test_rolling_max_min_periodsr   z  s    bjj1AYYcqtY<@@BF4yH6,
-C	z	-	-y!!!EIIK 
.	-	-	-s   .C  C	)r   r   )rw   N)g      .@      4@      9@r   )r         >@     A@r   )r   r   r   r   )r         D@      N@r   )r         T@g     @U@r   )      $@r   r   r   )r   r   r   r   )r   r   r   r   )gRB:@r   g      I@r   )r   r   r   r   )&numpyr   r-   pandas.errorsr   r   pandasr   r   r   r   r	   r
   r   r   r   pandas._testing_testingr   r#   r2   r9   rD   rF   re   rn   rp   rv   markparametrizer   r   r   r>   r   r   r   r    r$   r"   <module>r      sR    

 
 
 R ,-=`
=,"L, 	
	
	,,&@,F $ 0((0((&	
 (((((-(	
> ,?> ,F
LLr$   