+
    xȇiz                     V   ^ RI H t  ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	t
^ RI	HtHtHt ^ RIHt ^ RIHt ]P&                  R 4       t]P&                  R 4       t]P&                  R	 4       tR
 tR tR tR tR tR tR t]P<                  P?                  RR.RR..4      R 4       t R t!]P<                  P?                  R. RO4      R 4       t"R t#R t$R t%R t&]P<                  P?                  RRR.4      R 4       t']P<                  P?                  RR  R! .R"R#.R$7      R% 4       t(R& t)R' t*R( t+]P&                  R) 4       t,]P&                  R* 4       t-]P&                  R+ 4       t.]P&                  R, 4       t/]P&                  R- 4       t0]P&                  R. 4       t1]P&                  R/ 4       t2]P&                  R0 4       t3]P&                  R1 4       t4]P&                  R2 4       t5]P&                  R3 4       t6]P&                  R4 4       t7]P&                  R5 4       t8]P&                  R6 4       t9]P&                  ! . ROR77      R8 4       t:R9 t;]P<                  P?                  R:RR]Px                  R;R< //RR]Px                  3R;R;R= 3/R]! R]Px                  4      R;]! R;R> 4      /.4      R? 4       t=R@ t>]P<                  P?                  R:RRARB./RARARBRB/.4      RC 4       t?]P<                  P?                  R:RRARARBRB//RRARARBRB/R;RDRARERB//.4      RF 4       t@RG tA]P<                  P?                  R:RR]P                  R;RH //RR]P                  3R;R;RI 3/R]! R]P                  4      R;]! R;RJ 4      /.4      RK 4       tC]P<                  P?                  R:RRL]P                  RM]Px                  //RRL]P                  3R;RM]Px                  3/R]! RL]P                  4      R;]! RM]Px                  4      /.4      RN 4       tD]P<                  P?                  RORRRBRP.R;RARP./.RR;.RRBRP.R;RARP./..4      RQ 4       tE]P<                  P?                  R:RRBRP./RRBRP.R;RARP./.4      RR 4       tFRS tGRT tHRU tIRV tJRW tK]P<                  P?                  RX. RO4      RY 4       tLRZ tM]P<                  P?                  R[R\R]R^. ROR_R`R. RORa^3
RbRcRd^.^3,          R^R`Re. RORf^
3
R\R]R^. ROR_R`Rg. RORh^3
R\R]R^. ROR_RiR. RORj^3
.4      Rk 4       tN]P<                  P?                  Rl. RBRmRn^./3NRBRoRpRq.Rn^./3NRB]P                  RpRq.Rn^./3NRrRmRn^d./3NRNRr]P                  Rs3NRtRmRn^./3NRtRoRpRu.Rn^./3NRt]P                  RpRu.Rn^./3NRvRmRn^./3NRvRoRpRw.Rn^./3NRv]P                  RpRw.Rn^./3NRxRmRn^./3NRxRoRpRu.Rn^./3NRx]P                  RpRu.Rn^./3NRyRmRn^./3NRyRoRpRw.Rn^./3NRy]P                  RpRw.Rn^./3NRARmRnRz./3NRNRA]P                  R{3NR|RmRnRz./3NRNR|]P                  R}3NRPRmRnR~./3NRNRP]P                  R3NRRmRnR./3NRNR]P                  R3NRRmRnR./3NRNR]P                  R3N4      R 4       tP]P<                  P?                  RlRRBRoRq.3RB]P                  Rq.3RRRr]P                  R3RRtRoRu.3Rt]P                  Ru.3RRvRoRw.3Rv]P                  Rw.3RRxRoRu.3Rx]P                  Ru.3RRyRoRw.3Ry]P                  Rw.3.4      R 4       tQR tRR tSR# )    )datetimeN)lib)Day)	DataFrameNamedAggSeries)
date_rangec                  J    \        \        R ^^4      \        R ^^
4      RR7      # )  Min)startendfreq)r	   r        w/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/resample/test_resample_api.pydtir      s$    HT1a0htQ6KRWXXr   c                     \        \        P                  P                  ^4      P                  \	        V 4      4      V 4      # )   )r   nprandomdefault_rnglen)r   s   &r   _test_seriesr      s-    "))''*11#c(;SAAr   c                 ^    \        R VRVR\        P                  ! \        V 4      4      /4      # ABC)r   r   aranger   )r   r   s   &&r   
test_framer!      s'    c<lC3s8ATUVVr   c                     V P                  R 4      pR\        V4      9   g   Q hV P                  R RR7      pR\        V4      9   g   Q hR# )hzaDatetimeIndexResampler [freq=<Hour>, closed=left, label=left, convention=start, origin=start_day]
2000-01-01originzkDatetimeIndexResampler [freq=<Hour>, closed=left, label=left, convention=start, origin=2000-01-01 00:00:00]N)resamplestr)r   rs   & r   test_strr*   #   sd    c"A	:=@V	D	D 	c,7A	DGJ1v	N	Nr   c                 N   V P                  R 4      pVP                  4       p\        V\        4      '       g   Q h\	        V4      ^8X  g   Q hV P                  4       P                  R 4      pVP                  4       p\        V\        4      '       g   Q h\	        V4      ^8X  g   Q hR# )r#   N)r'   mean
isinstancer   r   to_framer   )r   r)   results   &  r   test_apir0   1   s    c"AVVXFff%%%%v;#((-AVVXFfi((((v;#r   c            	      >   \        R \        R^RR7      R. ROR. RO/4      P                  R 4      p \        R^R7      P                  4       \        R^R7      P                  4       ,           p\        P
                  P                  ^.^,          ^.^,          ,           V.RR .R	7      p\        R^.^,          ^.,           ^.^,          ,           ^.,           /VR
7      pV P                  R4      P                  R 4      R.,          p\        P                  ! WC4       R# )date
2016-01-01W)r   periodsr   groupvalz
2016-01-03r5   z
2016-01-17namesindexc                 @    V P                  R 4      P                  4       # )1D)r'   ffillxs   &r   <lambda>+test_groupby_resample_api.<locals>.<lambda>P   s    D1A1G1G1Ir   N)   rD   r   r   )            )r   r	   	set_indextolistpd
MultiIndexfrom_arraysgroupbyapplytmassert_frame_equal)dfir<   expectedr/   s        r   test_groupby_resample_apirU   =   s     
J\13G\<	

 i  	<+224
\1
-
4
4
6	7  MM%%sQw!q'8!&<WfDU%VE%!qA3!q!8A3!>?uMHZZ &&'IJE7SF&+r   c            
         \        R RR.^,          R\        R^
R7      R\        P                  P	                  ^4      P                  ^
4      /4      p V P                  R4      P                  R 4      P                  R4      P                  4       pV P                  R 4      P                  RRR7      P                  4       p\        P                  ! W!4       R	# )
keyr   r   datesr3   r8   valuesDonN)r   r	   r   r   r   standard_normalrI   rN   r'   r,   rP   rQ   rR   rT   r/   s      r   test_groupby_resample_on_apir_   T   s     
C:>Zb9bii++A.>>rB	

B ||G$,,U3<<SAFFHHZZ'''8==?F&+r   c            	         \        R ^R^/\        R^
RR7      R7      p V P                  4       pV P                  RRR7      pVP	                  R	 4      p\
        P                  ! W14       V P                  R4      pVP	                  R
 4      p\
        P                  ! W14       \        P                  P                  \        P                  ! RR.4      P                  R4      P                  ^4      VP                  .4      Vn        V P                  RRR7      pVP	                  R 4      p\
        P                  ! W14       R# )r   r   2000ns)r5   unitr;   5DF
group_keysc                     V # Nr   r@   s   &r   rB   *test_resample_group_keys.<locals>.<lambda>k       qr   c                     V # rh   r   r@   s   &r   rB   ri   p   rj   r   r$   z
2000-01-06Tc                     V # rh   r   r@   s   &r   rB   ri   {   rj   r   N)r   r	   copyr'   rO   rP   rQ   rK   rL   rM   to_datetimeas_unitrepeatr<   )rR   rT   gr/   s       r   test_resample_group_keysrr   e   s   	CC#:fbt+T	UBwwyH 	DU+AWW[!F&+ 	DAWW[!F&+ ]]..NNL,78@@FMMaPNN	
HN 	DT*AWW[!F&+r   c                 ~   VP                  R 4      pVP                  4       VP                  4       ,
          pVP                  R 4      p\        P
                  ! WC4       V P                  R 4      pVP                  4       VP                  4       ,
          pVP                  R 4      p\        P                  ! WC4       R# )r#   c                 L    V P                  4       V P                  4       ,
          # rh   maxr,   r@   s   &r   rB   test_pipe.<locals>.<lambda>       aeeg0r   c                 L    V P                  4       V P                  4       ,
          # rh   ru   r@   s   &r   rB   rw      rx   r   N)r'   rv   r,   piperP   assert_series_equalrQ   )r!   r   r)   rT   r/   s   &&   r   	test_piper|      s     	c"Auuw!HVV01F6, 	C Auuw!HVV01F&+r   c                 v   V P                  R 4      p\        P                  ! VP                  P                  V P                  4       V P                  R 4      R,          pVP                  P
                  V P                  ^,          8X  g   Q hV P                  R 4      R,          p\        P                  ! VP                  P                  V P                  ^ ^.,          4       V P                  R 4      R,          p\        P                  ! VP                  P                  V P                  ^ ^.,          4       R# )r#   r   N)r   r   )r'   rP   assert_index_equal_selected_objcolumnsnamer!   r)   s   & r   test_getitemr      s    C A!//11:3E3EFC %A??:#5#5a#8888 	C *A!//11:3E3Eq!f3MNC *A!//11:3E3Eq!f3MNr   rW   rZ   r   c                     VP                  R 4      pRp\        P                  ! \        VR7      ;_uu_ 4        W ,           RRR4       R#   + '       g   i     R# ; i)r#   z^\"Columns not found: 'D'\"$matchN)r'   pytestraisesKeyError)rW   r!   rq   msgs   &&  r   test_select_bad_colsr      s>    C A *C	xs	+	+	 
,	+	+	+s   	AA	c                     V P                  R 4      p\        P                  ! VP                  P	                  4       VR,          P	                  4       4       R# )r#   r   N)r'   rP   r{   r   sumr   s   & r   test_attribute_accessr      s6    C A133779afjjl3r   attrc                     \        R ^dRR7      p\        \        P                  ! \	        V4      4      VR7      pVP                  R4      p\        W04       VP                  4        \        W04       R# )1/1/2012sr5   r   r;   30sN)r	   r   r   r    r   r'   getattrr,   )r   rngtsrss   &   r   test_api_compat_before_user      sV     Z3
7C			#c(#3	/B	U	B B GGIBr   c                    T pR VR&   VP                  R4      pVRR.,          P                  4       p\        P                  ! VP                  P                  4       VP
                  P                  4       .^R7      p\        P                  ! WE4       V. RO,          P                  4       p\        P                  ! R4      pV'       d   Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  4        R	R	R	4       VP                  R
R7      p\        P                  ! WE4       R	#   + '       g   i     L:; i)foorZ   r#   r   r   axisz&agg function failed [how->mean,dtype->z-dtype 'str' does not support operation 'mean'r   NTnumeric_onlyr   )r'   r,   rK   concatr   r   rP   rQ   reescaper   r   	TypeError)r!   using_infer_stringrR   r)   r/   rT   r   s   &&     r   tests_raises_on_nuisancer      s    	BBsG
CASz]!Fyy!##((*acchhj1:H&+!&&(H
))<
=C=	y	,	,	 
-VVV&F&+ 
-	,s   /D22E	c            	         \        R ^dRR7      p \        \        P                  ! \	        V 4      RR7      V R7      pVP                  R4      P                  4       p\        . R
O\        RR^R7      R7      p\        P                  ! W#4       R	# )r   r   r   int64dtyper;   20s2012-01-01 00:00:00r   r5   N)r      (   <   P   )	r	   r   r   r    r   r'   asfreqrP   r{   )r   r   r/   rT   s       r   'test_downsample_but_actually_upsamplingr      sl    
Z3
7C			#c('2#	>B[[&&(F.UAFH 6,r   c            	      x   \        R ^dRRR7      p \        \        P                  ! \	        V 4      4      V R7      pVP
                  . R	O,          pVP                  R4      P                  4       P                  4       p\        . R
O\        P                  ! . RORRR7      R7      p\        P                  ! W44       R# )r   r   rb   )r5   r   rc   r;   2szdatetime64[ns]r   r   N)r   rD   r      rE   rG                  )g      ?g      @g      @      @r         &@r   g      .@      0@r   r   r         9@r   r   g      >@)r   z2012-01-01 00:00:02z2012-01-01 00:00:04z2012-01-01 00:00:06z2012-01-01 00:00:08z2012-01-01 00:00:10z2012-01-01 00:00:12z2012-01-01 00:00:14z2012-01-01 00:00:16z2012-01-01 00:00:18z2012-01-01 00:00:20z2012-01-01 00:00:22z2012-01-01 00:00:24z2012-01-01 00:00:26z2012-01-01 00:00:28z2012-01-01 00:00:30)r	   r   r   r    r   ilocr'   r,   r?   rK   DatetimeIndexrP   r{   )r   r   ts2r/   rT   s        r   *test_combined_up_downsampling_of_irregularr      s    
 Z3T
BC			#c(#3	/B
''8
9C\\$$$&,,.F	
$ $ #)
')HT 6,r   c                     V P                  R 4      pV P                  \        P                  ! R R7      4      P	                  R4      pVP	                  R4      p\
        P                  ! W24       R# )20minr   r,   N)r'   rN   rK   Grouper	transformrP   r{   )r   r)   rT   r/   s   &   r   test_transform_seriesr     sR    g&A##BJJG$<=GGOH[[ F6,r   r\   r2   c                    \        \        R ^^4      \        R ^^
4      RR7      pRVn        \        \        P
                  P                  ^4      P                  R4      \        R4      VR7      pVP                  \        P                  ! RR7      4      P                  R4      pV R8X  d#   VP                  RR	7      pVP                  4       pVP                  RV R
7      pVP                  R4      p\        P                  ! WS4       R# )r   rZ   r   r2   ABr   r<   r   r,   T)dropr[   N
   r   )r	   r   r   r   r   r   r   listrN   rK   r   r   reset_indexr'   rP   rQ   )r\   r<   rR   rT   r)   r/   s   &     r   test_transform_framer     s     xa+XdAr-BMEEJ	
		a ''0$t*E
B zz"**'23==fEH	V|''T'2^^
G#A[[ F&+r   funcc                 (    V P                  R RR7      # )r   Fre   r'   r@   s   &r   rB   rB   /  s    !**W*7r   c                 R    V P                  \        P                  ! R R7      RR7      # )r   r   Fre   rN   rK   r   r@   s   &r   rB   rB   0  s    !))BJJG4)Gr   r'   rN   )idsc                 f    V ! V4      pVP                  R  4      p\        P                  ! W14       R# )c                     V # rh   r   r@   s   &r   rB   0test_apply_without_aggregation.<locals>.<lambda>7  rj   r   N)rO   rP   r{   )r   r   tr/   s   &&  r   test_apply_without_aggregationr   ,  s*     	\AWW[!F60r   c                     V P                  R R7      P                  RRR7      pVR ,          P                  R 4      p\        P                  ! W P                  R 4      4       R# )r   )r   r   Fre   c                     V # rh   r   r@   s   &r   rB   1test_apply_without_aggregation2.<locals>.<lambda>=  s    Ar   N)r.   r'   rO   rP   r{   rename)r   groupedr/   s   &  r   test_apply_without_aggregation2r   ;  sR    ###/88U8SGU^!!+.F6#6#6u#=>r   c            	      h   \        \        P                  P                  ^4      P	                  R4      \        RRRR7      . ROR7      p V P                  R4      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R	R
RR/4       RRR4       R#   + '       g   i     R# ; i)r     r   r   r   r<   r   3minz&Label\(s\) \['r1', 'r2'\] do not existr   r1r,   r2r   N)r   r   r   r   r   r   r   r]   r	   r'   r   r   r   aggrR   r)   r   s      r   test_agg_consistencyr   A  s     

		a 00;#t<
B 	FA
3C	xs	+	+	tVT5)* 
,	+	+	+    B  B1	c            	      h   \        \        P                  P                  ^4      P	                  R4      \        RRRR7      ^R.R7      p V P                  R4      pRp\        P                  ! \        VR	7      ;_uu_ 4        VP                  ^R
RR/4       RRR4       R#   + '       g   i     R# ; i)r   r   r   r   r   ar   r   z"Label\(s\) \[2, 'b'\] do not existr   r,   br   N)r   r   r   r   s      r   'test_agg_consistency_int_str_column_mixr   Q  s    	
		a 00;#t<C
B 	FA
/C	xs	+	+	q&#u%& 
,	+	+	+r   c                  ^    \        \        R ^^4      \        R ^^
4      RRR7      p RV n        V # )r   rZ   rb   r   rc   r2   )r	   r   r   r;   s    r   r<   r<   d  s1    xa+XdAr-BSWXEEJLr   c                     \        \        P                  P                  ^4      P                  R4      \	        R4      V R7      pV# )r   r   r   r   )r   r   r   r   r   )r<   frames   & r   rR   rR   k  s8    
		a ''0$t*EE Lr   c                 "    V P                  4       # rh   )r   rR   s   &r   df_colr   s  s    >>r   c                     V P                  4       p\        P                  P                  \	        ^
4      V.RR.R7      Vn        V# )r   r<   r2   r9   )rm   rK   rL   rM   ranger<   )r   r<   df_mults   && r   r   r   x  sB    kkmGMM--	rE7F"3 . GM Nr   c                 N    V P                  R 4      R,          P                  4       # 2Dr   r'   r,   r   s   &r   a_meanr        ;;tS!&&((r   c                 N    V P                  R 4      R,          P                  4       # r   r'   stdr   s   &r   a_stdr        ;;tS!%%''r   c                 N    V P                  R 4      R,          P                  4       # r   r'   r   r   s   &r   a_sumr
    r  r   c                 N    V P                  R 4      R,          P                  4       # r   r   r   r   s   &r   b_meanr    r  r   c                 N    V P                  R 4      R,          P                  4       # r  r  r   s   &r   b_stdr    r  r   c                 N    V P                  R 4      R,          P                  4       # r  r	  r   s   &r   b_sumr    r  r   c                 $    V P                  R 4      # )r   r   r   s   &r   df_resampler    s    ;;tr   c                 (    V P                  R RR7      # )r   r2   r[   r   )r   s   &r   df_col_resampler    s    ??4F?++r   c                 (    V P                  R RR7      # )r   r2   levelr   )r   s   &r   df_mult_resampler    s    D//r   c                 N    V P                  \        P                  ! R R7      4      # )r   r   r   r   s   &r   df_grouper_resampler    s    ::bjjd+,,r   )paramsc                 8    V P                  V P                  4      # rh   )getfixturevalueparam)requests   &r   casesr!    s     ""7==11r   c                 ,   \         P                  ! WW4.^R7      p\         P                  P                  RR.RR..4      Vn        RVP
                  P                  P                  9   ds   V R,          P                  4       pV R,          P                  4       p\         P                  ! WxV.^R7      p\         P                  P                  . R
ORR..4      Vn        V P                  \        P                  R .4      p	\        P                  ! W4       R	# )rD   r   r   r   r,   z
<lambda_0>r   r2   c                 2    \         P                  ! V ^R7      # rD   )ddofr   r  r@   s   &r   rB   3test_agg_mixed_column_aggregation.<locals>.<lambda>  s    1Br   N)r2   r   r   )rK   r   rL   from_productr   nodecallspecidr,   r  	aggregater   rP   rQ   )
r!  r  r  r  r  r   rT   	date_meandate_stdr/   s
   &&&&&&    r   !test_agg_mixed_column_aggregationr/    s    yy&7a@H}}11C:?U2VWHGLL)),,,&M&&(	=$$&99i8<1E==55&,!78
 __bgg'BCDF&+r   r   r   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   rB     s    rvvaa/@r   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   rB     s    266!!3Dr   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   rB     s    266!RSCTr   c                     \         P                  ! W.^R7      pV P                  ! R/ VB p\        P                  ! WTRR7       R# )rD   r   T
check_likeNr   )rK   r   r,  rP   rQ   )r!  r  r  r   rT   r/   s   &&&&  r   #test_agg_both_mean_std_named_resultr6    s7     yy&q1H__#s#F&t<r   c                     \         P                  ! W.^R7      p\         P                  P                  RR.4      Vn        V P                  RRR./4      p\        P                  ! WC4       R# )rD   r   r   r,   r  Nr   r,   r   r  rK   r   rL   from_tuplesr   r,  rP   rQ   )r!  r  r  rT   r/   s   &&&  r   #test_agg_both_mean_std_dict_of_listr<    sU    yy&q1H}}00-1NOH__cFE?34F&+r   r,   r   c                     \         P                  ! W.^R7      pRR.Vn        V R,          P                  ! R/ VB p\        P
                  ! WT4       R# )rD   r   r,   r   r   Nr   )rK   r   r   r,  rP   rQ   )r!  r  r
  r   rT   r/   s   &&&&  r   test_agg_both_mean_sumr>    sG     yy&q1HH3Z!!(C(F&+r   mean2sum2c                     R p\         P                  ! \        P                  P                  VR7      ;_uu_ 4        V P                  V4       RRR4       R#   + '       g   i     R# ; i)nested renamer is not supportedr   N)r   r   rK   errorsSpecificationErrorr,  r!  r   r   s   && r   (test_agg_dict_of_dict_specificationerrorrF    s@     ,C	ryy333	?	? 
@	?	?	?s   AA(	c                     \         P                  ! WW4.^R7      p\         P                  P                  . R	O4      Vn        V P                  RRR.RRR./4      p\        P                  ! WeRR7       R# )
rD   r   r   r,   r  r   Tr4  N)r8  r9  r   r,   r   r  r:  )r!  r  r  r  r  rT   r/   s   &&&&&  r   test_agg_dict_of_listsrJ    sb    yy&7a@H}}00BH __cFE?C&%IJF&t<r   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   rB     s    bffQQ.?r   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   rB     s    "&&2Cr   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   rB     s    "&&QRBSr   c                     V R ,          P                  R 4      p\        P                  ! V R,          P                  4       V.^R7      pV P                  ! R/ VB p\
        P                  ! WCRR7       R# )r   c                 2    \         P                  ! V ^R7      # r$  r&  r@   s   &r   rB   &test_agg_with_lambda.<locals>.<lambda>  s    ):r   r   r   Tr4  Nr   )rO   rK   r   r   r   rP   rQ   )r!  r   rcustomrT   r/   s   &&   r   test_agg_with_lambdarR    sZ     Cj:;Gyy%*..*G41=HYYF&t<r   result1result2c                     R p\         P                  ! \        VR7      ;_uu_ 4        V RR.,          P                  ! R/ VB  RRR4       R#   + '       g   i     R# ; i)z0Label\(s\) \['result1', 'result2'\] do not existr   r   r   Nr   r   r   r   r   rE  s   && r   test_agg_no_columnrW    sC     >C	xs	+	+sCj$$ 
,	+	+	+s   AA	z	cols, aggr  c                     \         P                  ! W4WV.^R7      p\         P                  P                  . RO4      Vn        Ve
   W,          pMT pVP                  V4      p	\        P                  ! WRR7       R# )rD   r   NTr4  ))r   r   r9  rH  rI  )rK   r   rL   r;  r   r   rP   rQ   )
r!  colsr   r
  r  r  r  rT   objr/   s
   &&&&&&&   r   "test_agg_specificationerror_nestedr[    sd      yy%6Q?H}}00AH kWWS\F&t<r   c                     R p\         P                  ! \        P                  P                  VR7      ;_uu_ 4        V R,          P                  V4       RRR4       R#   + '       g   i     R# ; i)rB  r   r   N)r   r   rK   rC  rD  r   rE  s   && r   "test_agg_specificationerror_seriesr]  <  sF     ,C 
ryy333	?	?c
s 
@	?	?	?s   AA/	c           	          R p\         P                  ! \        VR7      ;_uu_ 4        V R.,          P                  RRR.RRR./4       RRR4       R#   + '       g   i     R# ; i)zLabel\(s\) \['B'\] do not existr   r   r   r  r   r,   NrV  )r!  r   s   & r   )test_agg_specificationerror_invalid_namesr_  G  sN     -C	xs	+	+se#u~sVUODE 
,	+	+	+s   "AA$	c                  >   \        \        R ^^4      \        R ^^
4      RR7      p RV n        \        \        P
                  P                  ^4      P                  R4      \        R4      V R7      pVP                  4       pVP                  4       p\        P                  P                  \        ^
4      VP                  .RR.R7      Vn        VP                  R4      pVVP                  RRR	7      VP                  RRR
7      VP!                  \        P"                  ! RR7      4      .pRpV Fa  p\$        P&                  ! \        P(                  P*                  VR7      ;_uu_ 4        VP-                  RRRR./RRRR.//4       RRR4       Kc  	  V F  p\$        P&                  ! \        P(                  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&                  ! \        P(                  P*                  VR7      ;_uu_ 4        VP/                  RRRR./RRRR.//4       RRR4       K  	  R#   + '       g   i     EKG  ; i  + '       g   i     L; i  + '       g   i     EK  ; i)r   rZ   r   r2   r   r   r<   r9   r   r[   r  rB  r   r   r   r,   r   r   r   Nrar  rbr   )r	   r   r   r   r   r   r   r   r   rm   rK   rL   rM   r   r<   r'   rN   r   r   r   rC  rD  r,  r   )r<   rR   r   r   r)   r!  r   r   s           r   test_agg_nested_dictsrc  O  s#   xa+XdAr-BMEEJ	
		a ''0$t*E
B ^^FkkmGMM--	rBHHgv%6 . GM 	DA	(V,


2::4()	E ,C]]29977sCCKKfe_5tcFE?=STU DC  ]]29977sCCsCjMtfe_-sTFE?4KL D
 ]]29977sCCEE3/tfe_6MNO DC  DCC DC
 DCCs$   (I"'I76J
"I47J
Jc            
         R \        R^^^ 4      RRRR/R \        R^^^4      RRRR/R \        R^^^4      RRRR/.p \        V 4      P                  R 4      pRp\        P                  ! \
        VR	7      ;_uu_ 4        VP                  R
4      P                  RR.RR.RR./4       RRR4       R#   + '       g   i     R# ; i)dti  rA   g      ?yg       @g      @g      ?zLabel\(s\) \['z'\] do not existr   30minr,   medianzr   N)r   r   rI   r   r   r   r'   r   )datarR   r   s      r   &test_try_aggregate_non_existing_columnrk  q  s     
xaA&S#s;	xaA&S#s;	xaA&S#s;D
 
4	"	"4	(B -C	xs	+	+
G  #xxj#w!OP 
,	+	+	+s   <*B00C	c            	         \        R . RO/\        R^RR7      R7      p RR lpRR lpRp\        P                  ! \        VR7      ;_uu_ 4        V P                  R4      P                  W.^^^R	7       R
R
R
4       V P                  R4      P                  W.^^R7      p\        ^^.^	^	.^
^
..\        R^RR7      \        P                  P                  RR.4      R7      p\        P                  ! WE4       R
#   + '       g   i     L; i)rA   
2020-01-01rZ   r   r;   c                      W,           V,           # rh   r   )rA   r   cs   &&&r   foo1/test_agg_list_like_func_with_args.<locals>.foo1      uqyr   c                      W,           V,           # rh   r   )rA   r   ro  s   &&&r   foo2/test_agg_list_like_func_with_args.<locals>.foo2  rr  r   z/foo1\(\) got an unexpected keyword argument 'b'r   )r   ro  N)ro  r   )rD   r   r   )rD   r   )r   r   )rA   rp  )rA   rt  )r   r	   r   r   r   r'   r   rK   rL   r;  rP   rQ   )rR   rp  rt  r   r/   rT   s         r   !test_agg_list_like_func_with_argsrv    s    		i
< M
B =C	y	,	,
Cd\1Q7 
- [[!!4,Q!7F
Q!Q"b"qs;))=-*HIH
 &+ 
-	,s   &C::D
	c                     \        \        R ^^4      \        R ^^
4      RR7      p \        P                  ! \	        V 4      \        P
                  R7      p\        RV RV/\        P                  P                  W.RR.R7      R	7      p\        RV/V R	7      pR
p\        P                  ! \        VR7      ;_uu_ 4        VP                  RRR7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  RRRR7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  RRR.R7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  RRR.R7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  RRR7      P!                  4        RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  RRR7      P!                  4        RRR4       VP                  R4      P#                  4       pRVP$                  n        VP                  RRR7      P#                  4       p\(        P*                  ! WV4       RVP$                  n        \        P                  ! \        RR7      ;_uu_ 4        VP                  RRR7      P#                  4        RRR4       VP                  RRR7      P#                  RR7      p\(        P*                  ! WV4       R#   + '       g   i     EL{; i  + '       g   i     ELL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELv; i  + '       g   i     L; i)r   rZ   r   r   r2   r   vdr9   r;   z\Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index'r   r   r  Nz2The Grouper cannot specify both a key and a level!)r\   r  zunhashable type: 'list'r[   z#\"Level \['a', 'date'\] not found\"z|Upsampling from level= or on= selection is not supported, use \.set_index\(\.\.\.\) to explicitly set index to datetime-likez0datetime64 type does not support operation 'sum'Tr   )r	   r   r   r    r   r   r   rK   rL   rM   r   r   r   r'   
ValueErrorr   r   r   r<   r   rP   rQ   )r<   r   rR   df_expr   expr/   s          r   test_selection_api_validationr}    s   xa+XdAr-BME
))CJbhh
/C		S!mm''S#J'G
B Sz/F	)  
y	,	,
D$ 
- ?C	z	-	-
DV3/ 
. $C	y	,	,
Dc6]+ 
- 1C	xs	+	+
Df. 
,
	J  
z	-	-
D$++- 
.	z	-	-
DV$++- 
. //$

#
#
%CCIIN[[&[)--/F#&CIIN	K
 
 	D$((*
 [[S[)--4-@F#&I 
-	,	, 
.	-	- 
-	,	, 
,	+	+ 
.	-	-	-	-	-
 
sT   <M>MM*M>	"N"N&"N:M	M'	*M;	>N	N#	&N7	:O
	col_namec           
      F   \        \        \        ^4      4      \        RR^RR7      V .R7      pVP	                  R4      P                  R.4      p\        . RO\        RR^RR7      \        P                  ! V .R..^ .^ ..R	7      R7      p\        P                  ! W#4       R
# )   z
2017-01-0115minzEurope/Berlin)r   r   r5   tzr   r>   r,   rZ   )levelscodesN)g     G@g     a@g     ph@)
r   r   r   r	   r'   r,  rK   rL   rP   rQ   )r~  rR   r/   rT   s   &   r   *test_agg_with_datetime_index_list_agg_funcr    s     
U3ZWco
 

B [[((&2F|#q_Uxj6(%;QC!:NH
 &+r   c                     \        R RRRR7      p \        P                  ! V 4      pVP                  RR7       \	        WR7      pVP                  R4      p\	        \        P                  ! ^ 4      \        P                  ! ^ 4      .V R	,          R7      p\        ^4      VP                  n
        VP                  R
4      p\        P                  ! WT4       VP                  R4      p\        P                  ! WT4       VP                  R4      p\        P                  ! WT4       VP                  R4      p\        P                  ! WT4       R# )rm  z
2020-01-021hrb   r   F)writer;   r>   :NN   lastfirstrv   minN)r	   r   
zeros_likesetflagsr   r'   rK   	Timestampr   r<   r   r   rP   r{   )r<   arrserr   rT   r/   s         r   test_resample_agg_readonlyr    s    |\4HE
--
CLLuL

"C	d	Br||AQ8dLHa&HNNVVF^F6,VVG_F6,VVE]F6,VVE]F6,r   zLstart,end,freq,data,resample_freq,origin,closed,exp_data,exp_end,exp_periodsz2000-10-01 23:30:00z2000-10-02 00:26:007min17minr   z20001002 00:26:00z20200101 8:26:35z20200101 9:31:5877srightz2020-01-01 09:30:45leftz20001002 00:43:00end_dayz2000-10-02 00:29:00c
           	          \        WVR 7      p
\        W:R7      pVP                  WEVR7      P                  4       p\        V\        WV	R7      R7      p\        P
                  ! W4       R# )r   r;   )r&   closed)r   r   r5   N)r	   r   r'   r   rP   r{   )r   r   r   rj  resample_freqr&   r  exp_dataexp_endexp_periodsr   r   resrT   s   &&&&&&&&&&    r   test_end_and_end_day_originr    s]    B Ud
+C		 B
++m6+
B
F
F
HCW+NH
 3)r   z#method, numeric_only, expected_dataTnumFcat
cat_1cat_2prodcan't multiply sequencer  cat_1rv   cat_2r  r  g      )@Could not convertrh  -Cannot convert \['cat_1' 'cat_2'\] to numericgH6%@!could not convert string to floatvarg      \@semg      @c                    \        R ^RR7      p\        R^RR7      p\        RRR.R^^./VR	7      pVP                  R4      pV\        P                  J d   / pMR
V/p\        Wp4      p	\        V\        4      '       d   V R9   d0   \        p
\        P                  ! RV  R24      pV'       d   RV  R2pM$V R9   d   V'       d   \        p
RV  R2pM\        p
Tp\        P                  ! WR7      ;_uu_ 4        V	! R/ VB pRRR4       R# V	! R/ VB p\        W%R	7      p\        P                  ! W4       R#   + '       g   i     R# ; i)
2018-01-01rZ   r   
2018-12-31YEr  r  r  r  r;   r   zagg function failed [how->z,dtype->z(dtype 'str' does not support operation ''r   N)r  r,   rh  r  )r   r  r  r   )r	   r   r'   r   
no_defaultr   r-   r(   r   r   r   rz  r   r   rP   rQ   )methodr   expected_datar   r<   expected_indexrR   	resampledkwargsr   klassr   _r/   rT   s   &&&&           r   test_frame_downsample_methodr  O  s3   X |QS9EadCN	EGW-uq"g>e	LBD!Is~~% ,/9%D-%%66E))8IJC!@J,,1CE<VHAFCEC]]5,,vA -, ]A
f/ -,,s   8	D77E	c                    \        R ^RR7      p\        R^RR7      p\        RR.VR7      pVP                  R4      pV\        P                  J d   / MRV/p\        Wp4      p	V'       dQ   V\        P                  Jd=   R	V  2p
\        P                  ! \        V
R
7      ;_uu_ 4        V	! R/ VB  RRR4       R# V R8X  dX   \        P                  ! R4      p
V'       d   Rp
\        P                  ! \        V
R
7      ;_uu_ 4        V	! R/ VB  RRR4       R# V	! R/ VB p\        W%R7      p\        P                  ! W4       R#   + '       g   i     R# ; i  + '       g   i     R# ; i)r  rZ   r   r  r  r  r  r;   r   z1Cannot use numeric_only=True with SeriesGroupBy\.r   Nr  z&agg function failed [how->prod,dtype->z-dtype 'str' does not support operation 'prod'r   )r	   r   r'   r   r  r   r   r   r   r   r   rP   r{   )r  r   r  r   r<   r  rR   r  r  r   r   r/   rT   s   &&&&         r   test_series_downsample_methodr    s   8 |QS9EadCN	'"%	0BD!I3>>1R7UF9%DCNN:B6(K]]9C00N6N 10	6	ii@AAC]]9C00N6N 10 ->
v0 100 100s   '	E	EE	E)	c                      \        \        P                  ! . RO4      R7      p \        \        P                  ! . RO4      R7      pV P                  R4      P	                  4       p\
        P                  ! W!4       R# )2018-01-01 00:00:00r;   8hN)r  z2018-01-01 12:00:002018-01-02 00:00:00)r  z2018-01-01 08:00:00z2018-01-01 16:00:00r  )r   rK   rn   r'   r,   rP   rQ   r^   s      r   test_resample_emptyr    s_    	nnQ

B
 nn
	H [[##%F&+r   c            
      D   \        R ^
^^^^
4      \        R ^
^^^^
4      \        R ^
^^^^
4      .p \        R. RO/V R7      pVP                  RRR7      P                  4       p\        P
                  ! \        P                  ! R4      \        P                  ! R4      \        P                  ! R4      .VP                  P                  R	R
7      p\        R\        P                  \        P                  \        P                  ./VR7      p\        P                  ! W$4       R# )i  valuer;   1min	start_dayr%   z2025-10-17 17:15:00z2025-10-17 17:16:00z2025-10-17 17:17:00r  r   N)r   rD   r   )r   r   r'   r   rK   r   r  r<   r   r   nanrP   rQ   )idxrR   r/   exp_idxr|  s        r   =test_asfreq_respects_origin_with_fixed_freq_all_seconds_equalr    s     	r2r2r*r2r2r*r2r2r*C
 
GY's	3B[[[4;;=F LL./LL./LL./	

 ll  G Wrvvrvvrvv67w
GC&&r   )groupsngroupsindices)r  r  r  r  )t2t2xt2qT_2Mt2pt2mt2m1T2M)	r   r   rF   	      r         r  )r   r     ?   )
rD   rF   rE   rF   rE   rF   rE   rF   rE   rF   )r   r  r  '   r  )r   r   -   r  )r  Fr  )r,   Fr  )rh  Fr  )r  Fr  )r  Fr  )r  Fr  r   )r   Tr   )r  Tr   )r  Fr   )r  Tr   )rv   Tr   )r  Tr   )r  Tr   )Tr   r   numpyr   r   pandas._libsr   pandas._libs.tslibsr   pandasrK   r   r   r   pandas._testing_testingrP   pandas.core.indexes.datetimesr	   fixturer   r   r!   r*   r0   rU   r_   rr   r|   r   markparametrizer   r   r   r   r   r   r   r   r   r   r   r   r<   rR   r   r   r  r  r
  r  r  r  r  r  r  r  r!  r/  r,   r6  r<  r>  rF  rJ  r   rR  rW  r[  r]  r_  rc  rk  rv  r}  r  r  r  r  r  r  r  r  r   r   r   <module>r     s
    	    #  
  4 Y Y B B W W	,.,",4, O #c
 34 54
 !AB C,$	-4-n- f~., /,$ 
7G 
Y  11?+ '&         ) ) ( ( ( ( ) ) ( ( ( (   , , 0 0 - - X22, 		#rww%@AB	sBGGncC)D#EF	hsBGG$c8C9T+UV==, 	Vfe_%u'EF,, 		vvue,-&&%/'6651	
		= 		#rvvs$?@A	sBFFmS3(C"DE	hsBFF#S(38S*TU== 		)RVVY89	y"&&!3BGG(<=	hy"&&)3BGG0LM%% 	eU^S65/:;  5%.#7	
	==  	S5%.!C%vuo#NOFPDQ,24'n I,,,-2 R "!,	
 C"H*!	
 "!,	
 "!,!	
K14j*k4j*0 )"	urdm$"	~urd;<" 
t DE" 
u~&	"
 	3" 
!:;" 
uqcl#" 
y%!56" 
	51# >?" 
urdm$" 
y%"67" 
	52$ ?@" 
$%" 
%%'EA378" 
#..57)UQC"@A"  
t}%!"" 
	52$78#"$ 
%'EB4!@A%"& 
v''"( 	-)"* 
!45+", 
4%$)-". 	L/"0 
3>>#ST1"2 
u12343"4 	<5"6 
 CD7"8 
uug&'9": 	<;"< 
 CD="> 
usen%?"@ 	<A"B 
 CDC"&N 0O&N 0F )	~&	/	$	y!		*	y!		*	%'#	#..7),		"	'+%.1/.1:,*'r   