+
    xȇi;                     *   ^ 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
HtHt ^ RIHt ^ RIHt  ! R R4      t]P&                  P)                  R. RNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0N4      ]P&                  P)                  RR
R	]P*                  .4      ]P&                  P)                  RR.RR..4      R 4       4       4       t]P&                  P)                  R]]]].4      R 4       tR# )1    N)lib)Pandas4Warning)	DataFrameIndexSeries	Timestamp
date_range)get_groupby_method_argsc                     a  ] tR t^t o ]P
                  R 4       t]P                  P                  RRR.4      R 4       t	]P                  P                  RRR.4      R 4       t
]P                  P                  RR	R
.4      R 4       t]P                  P                  RRR.4      R 4       t]P                  P                  RRR.4      R 4       t]P                  P                  RRR.4      R 4       tR tRtV tR# )TestNumericOnlyc                6   \        R . ROR. ROR. ROR\        . RORR7      R\        . RO\        R7      R\        \        R4      4      P	                  R	4      R
. ROR\        R^R7      R\        R^RR7      R\        P                  ! R^RR7      /
. ROR7      pV# )groupintfloatstringstrdtypeobjectcategory_stringabccategorycategory_intdatetime20130101)periods
datetimetz
US/Eastern)r   tz	timedeltaz1 ss)r   freq)columns)   r$      )r$   r%      )g      @g      @      @)abc)      	   )
r   r   r   r   r   r   r   r   r   r    )r   r   r   listastyper	   pdtimedelta_range)selfdfs   & v/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/groupby/test_numeric_only.pyr3   TestNumericOnly.df   s     y&>&?!6$u+#6#=#=j#I	Jz1=jQ<PR//qsK
4 	    methodmeanmedianc                   \        . RO4      pVP                  R4      p\        RR^	.RRR.R\        P                  ! R4      \        P                  ! R	4      .R R
^.R\        R4      \        R4      .R\        RRR7      \        RRR7      ./\        ^^.RR7      . ROR7      p\        WB4      ! RR7      p\        P                  ! VP                  V4      V4       VP                  pV P                  WWs4       R# )r   r   r   r   g      @g      @r'   r    z1.5s3sg      ?r   z2013-01-01 12:00:00z2013-01-03 00:00:00r   r   )r   )name)indexr#   Tnumeric_onlyNr   r   r   )r   groupbyr   r0   	Timedeltar   getattrtmassert_frame_equalreindex_liker#   _check)r2   r3   r7   expected_columns_numericgbexpectedresultexpected_columnss   &&&     r4   test_averagesTestNumericOnly.test_averages7   s     $))I#J ZZ a#sbll62BLL4FGQx3434 3E3E AW-!
. $$7
f11(;XF#++B 0Kr6   minmaxc                H    \        . RO4      pTpV P                  WW44       R# )r   N)r   r   r   r   r   r   r    r   rG   r2   r3   r7   rL   rH   s   &&&  r4   test_extremaTestNumericOnly.test_extrema[   s+    
 !

 $4 B 0Kr6   firstlastc                H    \        . RO4      pTpV P                  WW44       R# )r   N)	r   r   r   r   r   r   r   r   r    rR   rS   s   &&&  r4   test_first_lastTestNumericOnly.test_first_lasto   s)     

 $4 B 0Kr6   sumcumsumc                    \        . RO4      p\        . RO4      pVR8X  d   \        . RO4      pV P                  WWC4       R# )r   r\   Nr@   )r   r   r   r   r    )r   r   r   r    rR   )r2   r3   r7   rH   rL   s   &&&  r4   test_sum_cumsumTestNumericOnly.test_sum_cumsum   sA    #()I#J  C
 X$%RSB 0Kr6   prodcumprodc                H    \        . RO4      pTpV P                  WW44       R# )r   Nr@   rR   rS   s   &&&  r4   test_prod_cumprod!TestNumericOnly.test_prod_cumprod   s#     !AB#3 B 0Kr6   cummincummaxc                H    \        . RO4      pTpV P                  WW44       R# )r   N)r   r   r   r   r   r    rR   rS   s   &&&  r4   test_cummin_cummax"TestNumericOnly.test_cummin_cummax   s)     !S

 $4 B 0Kr6   c                   VP                  R 4      pVP                  R4      '       d   \        \        3M\        pVR9   dp   RP	                  RRV R2\
        P                  ! RV R24      RR	V R
2.4      p\        P                  ! WgR7      ;_uu_ 4        \        WR4      ! 4        RRR4       MVR9   d   RP	                  R\
        P                  ! RV R24      \
        P                  ! RV R24      R	V R
2.4      p\        P                  ! WgR7      ;_uu_ 4        \        WR4      ! 4        RRR4       M1\        WR4      ! 4       p\        P                  ! VP                  V4       VR9  d   RP	                  RRRRV R2\
        P                  ! RV R24      \
        P                  ! RV R24      R	V R
2.4      p\        P                  ! WgR7      ;_uu_ 4        \        WR4      ! RR7       RRR4       R# \        WR4      ! RR7      p\        P                  ! VP                  V4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r   cum|zCategorical is not orderedzCannot perform z with non-ordered Categoricalagg function failed [how->,dtype->object]*function is not implemented for this dtypez(dtype 'str' does not support operation ''matchNz-category type does not support sum operationsz,dtype->string]zcategory type does not supportFr>   )rO   rP   re   rf   r\   ra   )r[   r8   r9   r`   rV   rW   )rA   
startswithNotImplementedError	TypeErrorjoinreescapepytestraisesrC   rD   assert_index_equalr#   )	r2   r3   r7   rL   rH   rI   	exceptionmsgrK   s	   &&&&&    r4   rG   TestNumericOnly._check   s   ZZ 
 170A0A%0H0H ),i 	 LL((0%fX-JKII :6(/RS@>vhaH	C y44#% 5488((CII :6(/RSII :6(/RS>vhaH	C y44#% 54 R(*F!!&..2JK**((04@%fX-JKII :6(/RSII :6(/RS>vhaH
C y44#7 54 R(e<F!!&..2BCC 54 54$ 544s$   H3 I!I3I	I	I*	 N)__name__
__module____qualname____firstlineno__rz   fixturer3   markparametrizerM   rT   rY   r^   rc   rh   rG   __static_attributes____classdictcell__)__classdict__s   @r4   r   r      s1     ^^ > [[X'9:!L ;!LF [[Xu~6L 7L& [[X'89L :L$ [[Xx'89	L :	L [[X	':;L <L [[X(';<	L =	L6D 6Dr6   r   zkernel, has_argFTr?   keysa1a2c                    \        R ^^.R^^.R^^.R^\        .,          /4      p\        W4      pV\        P                  J d   / MRV/pVP                  V4      p\        Wp4      pV'       d`   VRJ dZ   V R8X  d
   \        p	Rp
MRp	R	p
\        P                  ! WR
7      ;_uu_ 4        V! V/ VB pRRR4       RXP                  9  g   Q hR# V R9   g   V R9   d2   V\        P                  J d   V! V/ VB pRVP                  9   g   Q hR# V'       d   VRJg   Q hV P                  R4      '       d   \        M\        pRP                  RRRRR\        P                   ! RV  R24      .4      p
V R8X  d   Rp
MV R8X  d   Rp
M	V R8X  d   Rp
\"        P$                  ! WR
7      ;_uu_ 4        V R8X  d
   \        p	Rp
MRp	R	p
\        P                  ! WR
7      ;_uu_ 4        V! V/ VB  RRR4       RRR4       R# V'       gL   V\        P                  Jd8   \"        P$                  ! \        RR
7      ;_uu_ 4        V! V/ VB  RRR4       R# V R9   g   Q hV\        P                  J g   Q h\"        P$                  ! \        RR
7      ;_uu_ 4        V! V/ VB  RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     R# ; i  + '       g   i     R# ; i  + '       g   i     R# ; i)r   r   a3r)   r?   Tcorrwithz'DataFrameGroupBy.corrwith is deprecatedN rq   rk   rl   znot allowed for this dtypez+cannot be performed against 'object' dtypesz!must be a string or a real numberzunsupported operand typero   rm   rn   quantile4dtype 'object' does not support operation 'quantile'idxminz8'<' not supported between instances of 'type' and 'type'idxmaxz8'>' not supported between instances of 'type' and 'type'1got an unexpected keyword argument 'numeric_only'rs   )anyallbfillffillnthnunique)diff
pct_change)r   r   r
   r   
no_defaultrA   rC   r   rD   assert_produces_warningr#   rt   ru   rv   rw   rx   ry   rz   r{   )kernelhas_argr?   r   r3   argskwargsrI   r7   warnr~   rK   r}   s   &&&&         r4   test_numeric_onlyr      s   T 
D1a&$Aq!fc1x<P	QB"6.D3>>1R7UF	D	BR F<4'Z!D;CDC''88T,V,F 9&..((( 	## HH. ((fnn$$$	4'''
 ,2+<+<U+C+C'	hh,=3*<		6vhoNO	
 ZHCxLCxLC]]900#%?++D<<'' = 10 S^^;]]P
 
 D#F#
 

 ////s~~---]]9,GHHD#F# IHq 988Z =< 100
 
 
 IHHsH   (	J#+4K
	J7	(K
:	K	K2#J4	7KK

K	K/	2L	r   c                    . ROp\        . ROV R7      pVP                  V4      pVR8X  d   \        WQ4      '       d   Q hR# \        WQ4      p\        . RO4      pVP                  V4      p\        W4      p	\	        W4      p
RpRpW9   dK   V \
        J dA   VR8X  d   RpMRp\        P                  ! \        VR7      ;_uu_ 4        V! V
!   RRR4       MGV \
        J d>   V! V
!  pV	! V
!  pW9   d   VP                  \
        4      p\        P                  ! W4       RpVV9  d:   Rp\        P                  ! \        VR7      ;_uu_ 4        V! V
R	R
/  RRR4       R# V \
        J dK   RP                  . RO4      p\        P                  ! \        VR7      ;_uu_ 4        V! V
R	R
/  RRR4       R# V \        8X  dA   VR8X  d:   Rp\        P                  ! \        VR7      ;_uu_ 4        V! V
R	R/  RRR4       R# V! V
R	R
/ pV! V
R	R/ p\        P                  ! W4       R#   + '       g   i     EL; i  + '       g   i     R# ; i  + '       g   i     R# ; i  + '       g   i     R# ; i)r   r   r   Nr   r   z!is not supported for object dtyperq   r   r?   Trl   z#Cannot use quantile with bool dtypeF)r   r   r$   )r$   r   r   )corrcovrf   re   ra   r\   r   )rV   rW   r   r   r   shiftr[   r   r   varr8   r9   rO   rP   r`   skewkurt)rV   rW   rP   r8   r9   rO   r`   r   semr   r   stdr[   r   rf   re   ra   r\   )z@SeriesGroupBy.sem called with numeric_only=True and dtype objectz=Series.skew does not allow numeric_only=True with non-numericz7cum(sum|prod|min|max) is not supported for object dtypezCCannot use numeric_only=True with SeriesGroupBy\..* and non-numeric)r   rA   hasattrrC   r
   r   rz   r{   rv   r/   rD   assert_series_equalrw   bool)r   groupby_funcrequestgrouperserrI   r7   expected_serexpected_gbexpected_methodr   fails_on_numeric_object
obj_resultr~   rK   rJ   has_numeric_onlys   &&&              r4   "test_deprecate_numeric_only_seriesr   O  s    G
%
(C	W	Bz!2,,,,R&F)$L&&w/Kk8O"<5DJ, .5F?:%HC5C]]9C00DM 10	&"D)%v.H
v0( ++A]]9C00D,t, 10	&hh
 ]]9C00D,t, 10	$<:53]]9C00D-u- 10 1D144e4
v0i 100> 100 100 100s0   H$
	H8	I)	I $H5	8I		I	 I1	)r   F)r   F)r   F)r   T)r   T)r   T)rf   T)re   T)ra   T)r\   T)r   F)r   F)rV   T)r   T)r   T)rW   T)rP   T)r8   T)r9   T)rO   T)r   F)r   F)r   F)r`   T)r   T)r   T)r   T)r   T)r   T)r[   T)r   T)rx   rz   pandas._libsr   pandas.errorsr   pandasr0   r   r   r   r   r	   pandas._testing_testingrD   pandas.tests.groupbyr
   r   r   r   r   r   r   r   r   r   r   r   r6   r4   <module>r      s   	   (    8CD CDL     	  		 
 	  	  	  	  	  	  	  	  	  	  	   	! " 	# $ 	% & 	' ( 	) * 	+ , 	- . 	/ 0 	1 2 	3 4 	5 6 	7 8 	9 : 	; < 	= > 	? #H $s~~)FG4&4,!78L$ 9 HI#LL$^ 4eV"<=m1 >m1r6   