+
    xȇiIU                        ^ RI Ht ^ RIt^ RIt^ RIt^ RIHtHt ^ RI	H
u Ht ^ RIHtHtHtHtHt ^ RIHt ^ RIHt ]P0                  R 4       t]P0                  ! R]P4                  ! RR	R
R]P6                  RRR]P6                  R	.
4      .R]P4                  ! ^^^^]P6                  ^^^]P6                  ^.
4      .R]P4                  ! ^^^^]P6                  ^^^]P6                  ^.
4      .R]P4                  ! ^^^^]P6                  ^^^]P6                  ^.
4      .R]P4                  ! ^^^^]P6                  ^^^]P6                  ^.
4      ..R R7      R 4       t]P0                  ! RRRRR]P:                  ! R]P<                  ! R4      R7      ]P:                  ! R]P<                  ! R4      R7      ]P:                  ! R]P<                  ! R4      R7      RR.
R 7      R! 4       tR-R" lt  ! R# R$4      t!]PD                  PG                  R%^.R&.3^^.R.R&.3^^.R&R&.3. R/O. R0O3. R1O. R2O3. R3O. R4O3. R5O. R6O3. R7O. R8O3. R9O. R:O3.	4      R' 4       t$]PD                  PG                  R%^.R&.3^^.R.R&.3^^.R.R..3. R/O. R0O3. R1O. R;O3. R3O. R4O3. R5O. R<O3. R7O. R=O3. R9O. R:O3.	4      R( 4       t%]PD                  PG                  R%^.R&.3^^.R.R&.3^^.R&R&.3. R/O. R0O3. R1O. R>O3. R3O. R4O3. R5O. R?O3. R7O. R8O3. R9O. R:O3.	4      R) 4       t&]PD                  PG                  R%^.R&.3^^.R.R&.3^^.R@R@.3. R/O. R0O3. R1O. RAO3. R3O. R4O3. R5O. RBO3. R7O. RCO3. R9O. R:O3.	4      R* 4       t']PD                  PG                  R%^.R&.3^^.R.R&.3^^.R.R&.3. R/O. R0O3. R1O. R0O3. R3O. R4O3. R5O. RDO3. R7O. REO3. R9O. R:O3.	4      R+ 4       t(]PD                  PR                  R, 4       t*R# )F    )chainN)InfinityNegInfinity)NANaTSeries	Timestamp
date_range)CategoricalDtypec                  d    \        ^^^^\        P                  ^^^\        P                  ^.
4      # )   )r   npnan     u/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/series/methods/test_rank.pyserr      s*    1aArvvq!Q:;;r   averageg      ?g      @      @g      @g       @minmaxfirstdensec                     V ^ ,          # )r   r   )xs   &r   <lambda>r   %   s    !A$r   )paramsidsc                     V P                   # Nparamrequests   &r   resultsr%      s     ==r   objectfloat64int64Float64Int64float64[pyarrow]pyarrowmarksint64[pyarrow]string[pyarrow]zstring[python]str)r   c                     V P                   # r    r!   r#   s   &r   dtyper3   +   s     ==r   c                     R pV R9   d   RpV# V R9   d   VR8X  g	   V'       d   RpV# Rp V# V R9   d   VR8X  g	   V'       d   RpV# RpV# )	r'   r)   r   zdouble[pyarrow]uint64[pyarrow]UInt64)r0   )r+   r/   )r)   r*   r   )r3   methodpct	exp_dtypes   &&& r   expected_dtyper:   =   s}    I##	  
8	8Y#)I  *I  
&	&Y#!I  !Ir   c                   2  a  ] tR t^Pt o R tR tR tR tR t]	P                  P                  R. RO4      ]	P                  P                  RRR	]! 4       ]! 4       3R
]P                  ]P                   ]P                   ) 3R]]P                   ]P                   ) 3]	P$                  ! R]]P                   ]P                   ) ]P(                  ! R4      R7      .4      R 4       4       tR t]	P                  P                  R]P0                  ^ .]P0                  R.]P2                  R..4      R 4       t]	P                  P                  R^.^.3^.^.3^ .^.3^^.^^.3. RO. RO3. RO. R O3. R!O. R"O3. R#O. R$O3.4      R 4       tR tR tR tR tR t Rt!V t"R	# )%TestSeriesRankc                *   \         P                  ! R 4      p\        P                  VR&   RVR&   VP	                  4       pVP                  R4      P	                  4       p\        P                  ! W44       \        P                  ! V4      pVP                  \        P                  4      p\        VP                  V4      VP                  RR7      p\        P                  Wu&   \        P                  ! W74       \        \        P                  ! ^4      P                  ^4      4      pVP	                  4       p	VP                  \         4      P	                  4       p\        P                  ! W4       \        \        P                  ! ^4      4      R,           pVR,          pVP	                  R	R
7      p	\        P                  ! W4       \        \        P                  ! ^^d4      4      p\        \        P                  ! R^d4      4      pVP	                  R	R
7      p	\        P                  ! W4       VP                  R4      p\        P                  V^&   \        \        P                  ! R^d4      4      p\        P                  V^&   VP	                  R	R
7      p	\        P                  ! W4       \        \        P                  ! ^4      4      R,           p\        P                  V^&   VR,          pVP	                  R	R
7      p	\        P                  ! W4       \        \        P                  ! \        P                  ^d4      4      pTpVP	                  R	R
7      p	\        P                  ! W4       \        \        P                  ! ^4      RR7      ^,           p\        P                  V^&   VR,          pVP	                  R	R
7      p	\        P                  ! W4       \#        R^R7      p
\        \        P                  ! ^4      V
RR7      ^,           p\        P                  VP$                  ^&   VR,          pVP	                  R	R
7      p	\        P                  ! W4       \        . RO4      p\        . RO4      pVP	                  4       p	\        P                  ! W4       \        RRR\&        .RR7      p\        ^^^\        P                  .4      pVP	                  4       p	\        P                  ! W4       \        P(                  ! . RORR7      p\        P*                  P-                  ^4      P/                  \1        V4      4      p\        W,          4      p\        VR,           RR7      pVP	                  4       p	\        P                  ! W4       R# )scipy.stats:NN         @:N
      Ots)indexname      ?      @Tr8   g)\(?floatr3   z1/1/1990)periodsz3 dayz	1 day 10mz-2 dayzm8[ns]r'   Ng@_)?)gJz5g0.++#B;g{Gz?gIf;g?)r?   r   rB               @)ig#Bǻg}gJzr   gWw'&l7rM   g|=r?   (   )pytestimportorskipr   r   rankastypetmassert_series_equalisnanfillnainfr   rankdatarE   arangerepeatrJ   r
   ilocr   arrayrandomdefault_rngpermutationlen)selfdatetime_seriessp_statsranksoranksmaskfilledexpiseriesiranksrngvaluesrandom_orders   &&           r   	test_rankTestSeriesRank.test_rankQ   s   &&}5!vv!$$$& '',113
u-xx( ''/ X&&v.fllNFF	
u*1,,Q/0nnU#((*
v+1&,m$'
v+1c*+RYYuc*+$'
v+ ..)VV
RYY{C01A$'
v+1&,VV
m$'
v+2663/0$'
v+ 1W59VV
m$'
v+Q/1s':Q>&&Qm$'
v+JK)*
v+ ';#>hOaArvv&'
v+L
 yy,,Q/;;CKH-.\C'y9
v+r   c           	        \        . RO4      p\        . RO4      p\        . RO4      P                  \        . RORR7      4      p\        P                  ! VP                  4       V4       \        P                  ! VP                  RR7      V4       \        . RO4      P                  \        . RORR7      4      p\        . R O4      pVP                  4       p\        P                  ! We4       \        . R!O4      P                  \        . R!OR4      4      p\        . RO4      pVP                  4       p	\        P                  ! W4       \        RRRR	R
R\        P                  .4      P                  \        . R"OR4      4      p
\        . R#O4      p\        . R$O4      p\        R RRRRR\        P                  .4      p\        P                  ! V
P                  RR7      V4       \        P                  ! V
P                  RR7      V4       \        P                  ! V
P                  RR7      V4       \        . R%O4      p\        . R&O4      p\        RRRRRR \        P                  .4      p\        P                  ! V
P                  RRR7      V4       \        P                  ! V
P                  RRR7      V4       \        P                  ! V
P                  RRR7      V4       Rp\        P                  ! \        VR7      ;_uu_ 4        V
P                  RRR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V
P                  RRR7       RRR4       \        RRRR	\        P                  .4      P                  \        . R'OR4      4      p
\        . R(O4      p\        . R)O4      p\        RRRR \        P                  .4      p\        P                  ! V
P                  RRR7      V4       \        P                  ! V
P                  RRR7      V4       \        P                  ! V
P                  RRR7      V4       R#   + '       g   i     EL<; i  + '       g   i     EL; i)*rG          @      @r@   rH   rP   r   secondthirdfourthfifthsixthT)
categoriesorderedF	ascendingtop	na_optionbottomkeep)r   r   z3na_option must be one of 'keep', 'top', or 'bottom'matchbadN      ?      ?      ?)r   r8   )rG   ru   rv   r@   rH   rP   )rP   rH   r@   rv   ru   rG   )r   rw   rx   ry   rz   r{   )ru   r@   rP   rv   rG   rH   )r   r?   rB   rO   rN      )r   rw   rx   ry   rz   r{   seventh)ru   rv   r@   rH   rP   r   rG   )rG   ru   rv   r@   rH   rP   r   )r   rP   rH   r@   rv   ru   rG   )rP   rH   r@   rv   ru   rG   r   )r   rw   rx   ry   )皙?333333?皙?rG   皙?r   r   r   r   rG   )r   rV   r   rW   rX   rU   r   r   rS   raises
ValueError)re   rl   exp_descr}   	unorderedexp_unorderedres
unordered1exp_unordered1res1na_serexp_topexp_botexp_keepmsgs   &              r   test_rank_categorical$TestSeriesRank.test_rank_categorical   s    3489D

&S
 	 	w||~s3
w||e|<hG D

&S
 	 =>nn
s2./66/7

   >? 
t4 h7GRVVL

&S
 	 <=<=3S#sC@A
v{{U{;WE
v{{X{>H
v{{V{<hG <=<=3S#sC@A
v{{Ue{LgV
KK(eK<g	
 	v{{Vu{MxX D]]:S11KK%5K9 2 ]]:S11KK$%K8 2 (GXrvvFGNNCTJ
 23234dC89
v{{U{EwO
v{{X4{H'R
v{{V{FQ# 211 211s   	Q	Q$Q!	$Q5	c                    \        . RORR7      pVP                  RR7      p\        . RORR7      p\        P                  ! W#4       R # )Nr*   rK   r   r   r)   )Nr?   NrB   rB   r?   rB   r   )N      @NrH   rH   r   rH   rG   )r   rU   rW   rX   )re   rl   resultexpecteds   &   r   test_rank_nullable_integer)TestSeriesRank.test_rank_nullable_integer  s:    37CF+DIV
v0r   c                    \        ^ ^.4      pVP                  RR7       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)r   r   r7   z,No axis named average for object type Seriesr   N)r   rU   rS   r   r   )re   sr   s   &  r   test_rank_signature"TestSeriesRank.test_rank_signature  sN    Aq6N	i <]]:S11FF9 2111s   A""A3	c           	        Vw  rgVR 8X  g   VR9   d	   V'       d   V'       g   VR8X  d   \         P                  ! R4       Vf   TMVP                  V4      pVR	9   d   V'       g~   \        V\        P
                  ! VP                  \        P                  \        P                  R7      4      &   \        P
                  ! V4      pVP                  \        4      p\        Wx&   VP                  VR7      p	VR8X  d<   V'       g4   \        P
                  ! V4      pVP                  \        4      p\        Wx&   \        V\        W64      R7      p
\        P                  ! W4       R# )
r(   r1   zint64/str does not support NaNN)r3   na_valuer   r0   rK   )r/   r5   r*   r+   r)   )rS   skiprV   r   r   rY   to_numpyr'   r   r&   rU   r   r:   rW   rX   )re   r   r%   r3   using_infer_stringusing_nan_is_nar7   rl   rj   r   r   s   &&&&&&     r   test_rank_tie_methods$TestSeriesRank.test_rank_tie_methods  s     W GG'&5E>KK89]c

5(933OMOCBJJHIJ88C=D**V$CCI(%%o88C=D**V$CCI#^E%BC
v0r   r   z!dtype, na_value, pos_inf, neg_infr&   Nr'   r)   r+   r,   r-   c	                   \         P                  ! R 4       VR8X  d   VR8X  d   Rp	MRp	MVR8X  d   VR8X  d   Rp	MRp	MRp	^p
V.V
,          V.V
,          ,           V.V
,          ,           p\        WR7      pR. RO. RO. RO3R. RO. RO. RO3R	. RO. RO. RO3R
. RO. RO. RO3R. RO. RO. RO3/pW,          pVR8X  d   V^,          V^ ,          V^,          .pMzVR8X  d   V^ ,          V^,          V^,          .pMXVR9   d)   V'       g!   V^ ,          \        .V
,          V^,          .pM)V^ ,          \        P
                  .V
,          V^,          .pV'       d   TMVRRR1,          p\        \        P                  ! V4      4      pVP                  WVR7      p\        VV	R7      p\        P                  ! VV4       R# )scipyr+   r   r5   r)   r6   r'   rK   r   r   r   r   r   r   N)r7   r   r   )r?   r?   r?   )rN   rN   rN   )   r   r   )r   r   r   )rO   rO   rO   )   r   r   )rB   rB   rB   )r   r   r   )	   r   r   r   r?   rB   )rO   rN   r   )r   r   r   r   rQ   )rS   rT   r   r   r   r   listr   from_iterablerU   rW   rX   )re   rank_methodr   r   r3   r   pos_infneg_infr   r9   chunkin_arrrm   	exp_ranksrh   orderr   r   exp_sers   &&&&&&&&&          r   "test_rank_tie_methods_on_infs_nans1TestSeriesRank.test_rank_tie_methods_on_infs_nans5  s   6 	G$&&i'.	-	ii'%	$	!IU"hZ%%777)e:KK-	9i8Iy)4Iy)4iI6iI6
	 &1XuQxq2E("1XuQxq2E55o1Xte|U1X6E1Xx%/q:E%552;++H56y  
 3
vw/r   c                   \        ^\        P                  \        P                  \        P                  ) ^.4      pVP	                  RR7      p\        ^\        P                  ^^^.RR7      p\
        P                  ! W#4       R# )r   Fr~   r'   rK   N)r   r   r   r[   rU   rW   rX   )re   rm   r   rl   s   &   r   test_rank_desc_mix_nans_infs+TestSeriesRank.test_rank_desc_mix_nans_infsz  s`     !RVVRVVbffWb9:.aAq);
v+r   z	op, valueg    .Agư>c                   \         P                  ! R 4      p\        P                  P	                  ^4      P                  ^	4      p\        P                  ! \        ^ ^	^4       Uu. uF  qeVR NK	  	  up4      p\        P                  P	                  ^4      P                  V4       \        \        V4      4       Uu. uF  p\        \        R4      V,           4      NK   	  ppV! WS4      p\        WR7      p	V	P                  VR7      p
TP                  YR8w  d   TMR4      p\        WR7      P                  R4      p\         P"                  ! W4       R# u upi u upi )r>   Na)rE   r   r   ordinalr'   )rS   rT   r   ra   rb   standard_normalconcatenaterangeshufflerd   chrordr   rU   r\   rV   rW   rX   )re   r   opvaluerg   xsirE   valsrD   r   sprankr   s   &&&&         r   test_rank_methods_series'TestSeriesRank.test_rank_methods_series  s    &&}5YY""1%55a8^^U1a^<^V^<=
		a ((,,1#b'N;NqSX\"N;"}D&,""!7+Y
 &.55i@
v0 = <s   $E<$Eser, expc                4   V^ ,          ^ 8  d$   VP                  R4      '       d   VRRR1,          p\        V4      P                  V4      pVP                  RR7      p\        V4      P                  \	        VR4      4      p\
        P                  ! WV4       R# )r   r1   Nr   r   rQ   
startswithr   rV   rU   r:   rW   rX   )re   r3   r   rl   r   r   r   s   &&&&   r   test_rank_dense_method%TestSeriesRank.test_rank_dense_method  sy     q6A:%**511dd)C3Ku%w'#;%%nUG&DE
v0r   c           	        Vw  rgVR 8X  g   VR
9   d	   V'       d   V'       g(   VR8X  d!   VP                  4       P                  V4      pMVP                  V4      pVP                  RR7      p	VP                  R4      '       dE   VP                  R4      P	                  4       VP                  R4      ,
          P                  4       p
M%VP	                  4       V,
          P                  4       p
VR8X  d-   V'       g%   V
P                  \        P                  \        4      p
\        P                  ! WP                  \        VR4      4      4       VP                  R4      '       dG   VP                  R4      P	                  4       VP                  R4      ,
          P                  VR7      p
M'VP	                  4       V,
          P                  VR7      p
VP                  VRR7      pVR8X  d-   V'       g%   V
P                  \        P                  \        4      p
\        P                  ! WP                  \        W64      4      4       R	# )r(   r1   Fr~   r'   r0   r   r   )r7   r   N)r/   r*   r)   )dropnarV   rU   r   r   replacer   r   r   rW   rX   r:   )re   r   r%   r3   r   r   r7   _r   r   r   res2s   &&&&&&      r   test_rank_descending#TestSeriesRank.test_rank_descending  s    	W??&5E>

##E*A

5!Affuf%E""+//1AHHY4GGMMOH!))+H%%o''3H
sOON5)4T$UVE""+//1AHHY4GGMM N H !)))8HvvVuv5%%o''3H
t__^E5R%STr   c                    Vw  r4VP                  4       P                  R 4      pVP                  VR7      p\        V4      P                  4       pVP                  Vn        \
        P                  ! Wg4       R# )i8r   N)r   rV   rU   r   rE   rW   rX   )re   r   r%   r7   rl   r   r   r   s   &&&     r   test_rank_intTestSeriesRank.test_rank_int  sZ    JJL%v&#;%%'
v0r   c                   \        \        P                  .^ ,          4      P                  \        4      P                  RR7       \        \        P                  .^ ,          4      P                  \        4      P                  RR7       R# )    Tr~   FN)r   r   r   rV   r&   rU   )re   s   &r   test_rank_object_bug#TestSeriesRank.test_rank_object_bug  sZ     	x"}$$V,11D1Ax"}$$V,11E1Br   c                    \        \        R 4      \        .4      pVP                  4       pVP	                  4        Tp\
        P                  ! W24       R# )z2017-01-05 10:20:27.569000N)r   r	   r   copyrU   rW   rX   )re   r   r   r   s   &   r   test_rank_modify_inplace'TestSeriesRank.test_rank_modify_inplace  s@     I:;SAB668	
v0r   c                    \        R R	R\        R.RR7      pVP                  RR7      p\        ^^^\        ^.RR7      p\        P                  ! W#4       R# )
g*"Fg{Q :g1A;-:r)   rK   r   r   r6   Ng3!ǻ)r   r   rU   rW   rX   )re   r   r   r   s   &   r   test_rank_ea_small_values(TestSeriesRank.test_rank_ea_small_values  sT    =-]K
 '1aB*(;
v0r   r   )r   r   r   r   rO   r?   r   )rB   r?   r   r   r   rN   rN   rB   )r   r   rB   rB   r?   rQ   )r   r?   rB   rO   rN   )#__name__
__module____qualname____firstlineno__rr   r   r   r   r   rS   markparametrizer   r   r   r   r[   r   r"   td
skip_if_nor   r   operatoraddmulr   r   r   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r<   r<   P   s    Y,vVRp11B [[[*CD[[+tXZ70BFFRVVG,LL"mmI.		
30 E 30j, [[\\1\\3\\4 	
11" [[S1#JS1#JS1#JVaV	"	"o.!?3		
11UB1C11 1r   r<   r   rG   c                 :   V^ ,          ^ 8  d$   V P                  R4      '       d   VRRR1,          p\        V4      P                  V 4      pVP                  RRR7      p\        V4      P                  \	        V RRR7      4      p\
        P                  ! WE4       R# )r   r1   Nr   Tr7   r8   rI   rQ   r   r3   r   rl   r   r   r   s   &&&   r   test_rank_dense_pctr    }     1vze&&u--$B$is5!AVV7V-Fc{!!.T"JKH6,r   c                 :   V^ ,          ^ 8  d$   V P                  R4      '       d   VRRR1,          p\        V4      P                  V 4      pVP                  RRR7      p\        V4      P                  \	        V RRR7      4      p\
        P                  ! WE4       R# )r   r1   Nr   Tr  rI   rQ   r   r  s   &&&   r   test_rank_min_pctr    }     1vze&&u--$B$is5!AVV5dV+Fc{!!.4"HIH6,r   c                 :   V^ ,          ^ 8  d$   V P                  R4      '       d   VRRR1,          p\        V4      P                  V 4      pVP                  RRR7      p\        V4      P                  \	        V RRR7      4      p\
        P                  ! WE4       R# )r   r1   Nr   Tr  rI   rQ   r   r  s   &&&   r   test_rank_max_pctr  '  r  r   c                 :   V^ ,          ^ 8  d$   V P                  R4      '       d   VRRR1,          p\        V4      P                  V 4      pVP                  RRR7      p\        V4      P                  \	        V RRR7      4      p\
        P                  ! WE4       R# )r   r1   Nr   Tr  rI   rQ   r   r  s   &&&   r   test_rank_average_pctr  >  s}     1vze&&u--$B$is5!AVV9$V/Fc{!!.	t"LMH6,r   c                 :   V^ ,          ^ 8  d$   V P                  R4      '       d   VRRR1,          p\        V4      P                  V 4      pVP                  RRR7      p\        V4      P                  \	        V RRR7      4      p\
        P                  ! WE4       R# )r   r1   Nr   Tr  rI   rQ   r   r  s   &&&   r   test_rank_first_pctr  U  r  r   c                      \        \        P                  ! R4      4      p V P                  RR7      P	                  4       pV^8X  g   Q hR# )r?   TrI   Ni  )r   r   r]   rU   r   )r   r   s     r   test_pct_max_many_rowsr  l  s<     	ryy#$AVVV!!#FQ;;r   )Fr   r   )UUUUUU?UUUUUU?rG   )r   r?   r?   )r   rG   rG   r   )rG   r  r  r   )r  r  rG   rG   r  )r   r   rB   rB   rN   rN   )r  r  r  r  rG   rG   r   r   )r  r  r  )r   r   r   r   r   )UUUUUU?r  r   r   竪?r   )r  rG   rG   )r   r   rG   rG   r   r   )r  r   r   )333333?r!  ?r"  r   )r   r   竪?r#  UUUUUU?r$  )r   r   r   rG   r   )r  r  r   r  r   rG   )+	itertoolsr   r  numpyr   rS   pandas._libs.algosr   r   pandas.util._test_decoratorsutil_test_decoratorsr  pandasr   r   r   r	   r
   pandas._testing_testingrW   pandas.api.typesr   fixturer   r`   r   r%   r"   r  r3   r:   r<   r  r  r  r  r  r  r  
single_cpur  r   r   r   <module>r1     s       * )   - < < 	BHHc3S"&&#sCQTUVW	!Q1bffaArvvqABC	!Q1bffaArvvqABC	"((Aq!Q1aCDE	"((Aq!Q1aCDE 			 'r}}Y/GH%R]]9-EF&bmmI.FG&c1 c1R 
se
Q'7#$
Q#s	/0	/0	/0	GH	ST	LM
-- 
se
Q'7#$
Q'7#$	/0	/0	/0	GH	ST	LM
-- 
se
Q'7#$
Q#s	/0	/0	/0	GH	ST	LM
-- 
se
Q'7#$
Q'7#$	/0	/0	/0	GH	ST	LM
-- 
se
Q'7#$
Q'9%&	/0	/0	/0	GH	ST	LM
--  r   