+
    yȇi                     (   ^ RI H t Ht ^ RIHt ^ RIt^ RIt^ RIt^ RIH	t	H
t
HtHtHtHtHtHtHtHtHtHtHtHtHtHtHt ^ RIHt ^ RIHt ^ RIH t  R t! ! R R	4      t" ! R
 R4      t# ! R R4      t$ ! R R4      t% ! R R4      t& ! R R4      t'R# )    )datetime	timedelta)DecimalN)Categorical	DataFrameDatetimeIndexIndexNaTPeriodPeriodIndex
RangeIndexSeries	TimedeltaTimedeltaIndex	Timestamp
date_rangeisnaperiod_rangetimedelta_rangeto_timedelta)nanops)ArrowStringArrayc                     \        R R.^,          RR7      \        \        P                  ! ^
4      \        P                  RR7      \        \        P                  ! ^
4      \        P                  RR7      \        \        R^
RR7      RR7      \        \        R^
RR7      RR7      P                  RR	7      \        \        R^
R
R7      RR7      \        \        ^
4       U u. uF  p \        V 4      NK  	  up RR7      .p\        P                  P                  ^4      P                  ^
4      pV Uu. uF  p\        W#RR7      NK  	  ppW,           pV# u up i u upi )TFa)namedtyper   
2020-01-01ns)periodsunitz
US/EasterntzDr    freqindexr   )r	   nparangeint64float64r   r   tz_localizer   r   rangestrrandomdefault_rngstandard_normalr   )iindexesarridxseriesobjss         w/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/reductions/test_reductions.pyget_objsr:   #   s	   tUmac*biim288#6biim2::C8jrECP|Rd;#	

++
&LrD3OuRy)y!s1vy)4
G ))


"
2
22
6C:AB'3fS#.'FBDK * Cs   E.Ec                     a  ] tR t^7t o ]P
                  P                  R4      ]P
                  P                  RRR.4      ]P
                  P                  R]! 4       4      R 4       4       4       t	]P
                  P                  RRR.4      ]P
                  P                  RRRR]
! R	^^4      3RR.4      R
 4       4       t]P
                  P                  RRR.4      R 4       t]P
                  P                  RRR.4      ]P
                  P                  RRR.4      R 4       4       tR t]P
                  P                  RRR.RR..4      R 4       t]P
                  P                  RRR.4      R 4       tR tRtV tR# ) TestReductionsz8ignore:Period with BDay freq is deprecated:FutureWarningopnamemaxminobjc                "   \        W!4      ! 4       p\        V\        4      '       gm   \        VP                  \        4      '       d1   \        \
        P                  ! VP                  4      V4      ! 4       pML\        VP                  V4      ! 4       pM0\        \        VP                  V4      ! 4       VP                  R 7      p\        VRR4      e6   VP                  R4      P                  R4      pVP                  V8X  g   Q hR# W48X  g   Q hR# ))ordinalr&   r#   NM8[ns]r+   )getattr
isinstancer   valuesr   r)   arrayr   asi8r&   astype_value)selfr=   r@   resultexpecteds   &&&  r9   test_opsTestReductions.test_ops8   s     %'#{++#**&677"288CJJ#7@B"3::v68gchh&?&AQH3d#/x077@H==H,,,%%%    z
dtype, valdatetime64[ns]  c                Z  a TpV3R  lpV! R.SR7      pV! \        Wq4      ! 4       4      '       g   Q hV! \        Wq4      ! RR7      4      '       g   Q hV! . SR7      pV! \        Wq4      ! 4       4      '       g   Q hV! \        Wq4      ! RR7      4      '       g   Q hSR8X  d   R# V! RV.SR7      p\        Wq4      ! 4       V8X  g   Q hV! \        Wq4      ! RR7      4      '       g   Q hV! RVR.SR7      p\        Wq4      ! 4       V8X  g   Q hV! \        Wq4      ! RR7      4      '       g   Q hR# )c                 j   < SR 8X  d	   V \         J # SR9   d   V \        P                  J # \        V 4      # )rQ   )Int64boolean)r
   pdNAr   )resr   s   &r9   check_missing4TestReductions.test_nanminmax.<locals>.check_missing^   s7    ((cz!..bee|#Cy rP   Nr   Fskipnaobject)rD   )rK   r=   r   valindex_or_seriesklassrZ   r@   s   &&f&&   r9   test_nanminmaxTestReductions.test_nanminmaxO   s#     	! TF%(WS134444WS1?@@@@Be$WS134444WS1?@@@@HT3Ku-s#%,,,WS1?@@@@T3%U3s#%,,,WS1?@@@@rP   c                V   TpV\         J d
   R V,           MRV,           pV! \        \        R^^4      .4      p\        WT4      ! 4       ^8X  g   Q h\        P
                  ! \        RR7      ;_uu_ 4        \        WT4      ! RR7       RRR4       V! \        \        R^^4      \        .4      p\        WT4      ! 4       ^8X  g   Q h\        P
                  ! \        RR7      ;_uu_ 4        \        WT4      ! RR7       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)argr6   rR   Encountered an NA valuematchFr]   N)r	   r
   r   rD   pytestraises
ValueError)rK   r=   ra   rb   arg_opr@   s   &&&   r9   test_nanargminmax TestReductions.test_nanargminmaxz   s      #(E>uv~S(4Q/01s#%***]]:-FGGC . H S(4Q/56s#%***]]:-FGGC . HG HG HGGs   3D'DD	D(	r   rC   zdatetime64[ns, UTC]c                   TpV\         J d
   R V,           MRV,           pV! . VR7      p\        Wa4      ! 4       \        J g   Q h\        Wa4      ! RR7      \        J g   Q h\        P                  ! \
        RR7      ;_uu_ 4        \        We4      ! 4        RRR4       \        P                  ! \
        RR7      ;_uu_ 4        \        We4      ! RR7       RRR4       R#   + '       g   i     LQ; i  + '       g   i     R# ; i)rf   r6   r\   Fr]   zempty sequencerh   N)r	   rD   r
   rj   rk   rl   )rK   r=   ra   r   rb   rm   r@   s   &&&&   r9   test_nanops_empty_object'TestReductions.test_nanops_empty_object   s      #(E>uv~Be$s#%,,,s#51S888]]:-=>>C " ?]]:-=>>C . ?> ?>>>>s   C C0C-	0D	c           	     
   \        \        P                  ! ^RR7      4      pVP                  4       ^ 8X  g   Q hVP	                  4       ^8X  g   Q h\        \        P
                  ^\        P
                  ^.4      pVP                  4       ^8X  g   Q hVP	                  4       ^8X  g   Q h\        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP	                  RR7       RRR4       \        \        P
                  .4      p\        P                  ! \        RR7      ;_uu_ 4        VP                  4        RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP	                  4        RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP	                  RR7       RRR4       \        \        \        R	^^4      \        R	^^4      \        .4      pVP                  4       ^8X  g   Q hVP	                  4       ^8X  g   Q h\        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP	                  RR7       RRR4       \        \        .4      p\        P                  ! \        RR7      ;_uu_ 4        VP                  4        RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP	                  4        RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP	                  RR7       RRR4       R#   + '       g   i     ELE; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELX; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELn; i  + '       g   i     ELE; i  + '       g   i     EL; i  + '       g   i     R# ; i)
   r+   r\   rg   rh   Fr]   NEncountered all NA valuesrR   )r	   r)   r*   argminargmaxnanrj   rk   rl   r
   r   )rK   r@   s   & r9   test_argminmaxTestReductions.test_argminmax   s*   BIIaw/0zz|q   zz|q   RVVQ*+zz|q   zz|q   ]]:-FGGJJeJ$ H]]:-FGGJJeJ$ H RVVHo]]:-HIIJJL J]]:-HIIJJL J]]:-FGGJJeJ$ H]]:-FGGJJeJ$ H S(4Q/$A1FLMzz|q   zz|q   ]]:-FGGJJeJ$ H]]:-FGGJJeJ$ H SEl]]:-HIIJJL J]]:-HIIJJL J]]:-FGGJJeJ$ H]]:-FGGJJeJ$ HG= HGGGGG JIIIIIGGGGGG HGGGGG JIIIIIGGGGGGs   PP0%Q"QQ,R 8R7R(R<S S$?S8P-	0Q	Q	Q)	,Q=	 R	R%	(R9	<S	S!	$S5	8T		zop, expected_colr   bc           	     
   \        \        R ^RRR7      R.R7      pVP                  P                  \	        RR7      4      VR&   \        W14      ! ^R	7      pW2,          P                  R
4      p\        P                  ! WE4       R
# )z2016-01-01 00:00:00UTCr   )r    r#   r!   r   )columnsi  secondsr{   axisN)	r   r   r   subtractr   rD   renametmassert_series_equal)rK   opexpected_coldfrL   rM   s   &&&   r9   test_same_tz_min_max_axis_1*TestReductions.test_same_tz_min_max_axis_1   sn     ,aEME
 $$--	$ 783a(#**40
v0rP   funcmaximumminimumc                    Tp\         P                  ! R .4      P                  V4      p\        V4      p\	        \
        V4      ! WU4      p\        P                  ! We4       R# )2019N)rW   to_datetimer-   r   rD   r)   r   r   )rK   tz_aware_fixturer   r#   rf   rM   rL   s   &&&    r9   (test_numpy_reduction_with_tz_aware_dtype7TestReductions.test_numpy_reduction_with_tz_aware_dtype   sL     nnfX&2226#;T"86
v0rP   c           
         \        R \        ^^\        .RR7      R\        ^^\        P                  .RR7      /4      p\        R \        ^4      R^/4      pVP                  4       p\        P                  ! W24       R# )Atimedelta64[ns]r\   BrU   N)	r   r   r
   rW   rX   r   sumr   r   )rK   r   rM   rL   s   &   r9   test_nan_int_timedelta_sum)TestReductions.test_nan_int_timedelta_sum   sl    VQ3K/@AVQ255M9
 3	!c156
v0rP    N)r_          @)r,   r   )rU      )rV   T)__name__
__module____qualname____firstlineno__rj   markfilterwarningsparametrizer:   rN   r   rc   rn   rq   ry   r   r   r   __static_attributes____classdictcell____classdict__s   @r9   r<   r<   7   s    [[B [[Xu~6[[UHJ/& 0 7
&$ [[Xu~6[[xb!45	
	A	 7A@ [[Xu~6/ 7/" [[Xu~6[[Wx1F&GH/ I 7/'%R [[/5#,1MN	1 O	1 [[Vi%;<1 =1
1 
1rP   r<   c            	         a  ] tR t^t o ]P
                  P                  R. RO4      R 4       tR t]P
                  P                  RRR.4      R 4       t	R t
R	 t]P
                  P                  R
. RO4      R 4       tR t]P
                  P                  RRR.4      R 4       tR tR tR tR t]P
                  P                  RRR.4      ]P
                  P                  R. ].]]]..4      R 4       4       tR tR tRtV tR# )TestIndexReductionszstart,stop,stepc                   \        WV4      pVP                  P                  4       pVP                  4       pWe8X  g   Q hVP                  R R7      pWu8X  g   Q hVP                  P                  4       pVP                  4       pWe8X  g   Q hVP                  R R7      pWu8X  g   Q h\        WV) 4      p\	        VP                  4       4      '       g   Q h\	        VP                  4       4      '       g   Q hR# Fr]   N)r   _valuesr>   r?   r   )rK   startstopstepr6   rM   rL   result2s   &&&&    r9   test_max_min_range&TestIndexReductions.test_max_min_range   s     d+;;??$!!! ''''""";;??$!!! ''''""" te,CGGICGGIrP   c                   \        . RO4      pVP                  '       g   Q h\        R \        P                  RR.4      pVP                  '       d   Q hW3 Fq  pVP	                  4       \        R 4      8X  g   Q hVP                  4       \        R4      8X  g   Q hVP                  4       ^ 8X  g   Q hVP                  4       ^8X  d   Kq  Q h	  R# )1 days3 daysr
   N)r   2 daysr   )	r   is_monotonic_increasingr)   rx   r?   r   r>   rv   rw   rK   idx1idx2r6   s   &   r9   test_minmax_timedelta64+TestIndexReductions.test_minmax_timedelta64  s    <=+++++ x5AB/////<C779	( 3333779	( 3333::<1$$$::<1$$$	  rP   r   r?   r>   c                   \        . 4      p\        W!4      ! 4       \        J g   Q h\        \        .4      p\        W!4      ! 4       \        J g   Q h\        \        \        \        .4      p\        W!4      ! 4       \        J g   Q hR # N)r   rD   r
   rK   r   r@   s   && r9   !test_minmax_timedelta_empty_or_na5TestIndexReductions.test_minmax_timedelta_empty_or_na  sl     R s!S(((cU#s!S(((c3_-s!S(((rP   c                   \        R RRR7      p\        P                  ! V4      \        R 4      8X  g   Q h\        P                  ! V4      \        R4      8X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \        P                  ! V4      ^ 8X  g   Q h\        P                  ! V4      ^8X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L~; i  + '       g   i     R# ; i)z
16815 daysz
16820 daysr$   r&   $the 'out' parameter is not supportedrh   outN)
r   r)   r?   r   r>   rj   rk   rl   rv   rw   )rK   tderrmsgs   &  r9   test_numpy_minmax_timedelta641TestIndexReductions.test_numpy_minmax_timedelta64)  s7   \<cBvvbzY|4444vvbzY|44447]]:V44FF21 5]]:V44FF21 5 yy}!!!yy}!!!7]]:V44IIba  5]]:V44IIba  54 54444 54444s0   F/GGG)/G 	G	G&	)G:	c           
     p   \        \        ^
4       Uu. uF%  p\        R4      \        W,          R7      ,           NK'  	  up4      pVP	                  4       pVP                  4       p\        \        ^	R7      4      pWE8X  g   Q hVP                  4       P                  4       pV^ ,          V8X  g   Q hVP                  R4      p\        \        P                  ! RR4      4      pWE8X  g   Q hVP                  4       p\        R4      pWE8X  g   Q hVP                  4       P                  4       pV^ ,          V8X  g   Q hVP                  4       p\        R4      pWE8X  g   Q hVP                  4       P                  4       pV^ ,          V8X  g   Q hVP                  4       p\        \        VP                  4       P                   4      P                  4       4      pWE8X  g   Q hVP                  4       P                  4       pV^ ,          V8X  g   Q h\        \        R4      \        R	4      .4      pVP	                  4       P                  4       \        ^R
7      8X  g   Q h\        \        R4      \        R	4      \        R4      .4      pVP	                  4       P                  4       \        ^R
7      8X  g   Q hR# u upi )
   20130101r   g?i(
  msz00:00:09z00:01:21z
2015-02-03z
2015-02-07)daysz
2015-02-15N)r   r.   r   r   diffmeanr   to_framequantiler   r)   timedelta64medianr   stddropnarF   )rK   r3   sr   rL   rM   s   &     r9   test_timedelta_ops&TestIndexReductions.test_timedelta_ops>  s:    GLRyQy!Yz"Yqu%===yQ
 VVX	! 45!!!##%ayH$$$S!R^^D$78!!!
+!!!%%'ayH$$$ 
+!!!""$ayH$$$ ryy{'9'9 : > > @A!!!""$ayH$$$ Il+Y|-DEFvvx I1$5555|$i&=y?VW
 vvx I1$5555_ Rs   +J3r=   c           
     \   \        \        ^
4       Uu. uF%  p\        R4      \        W",          R7      ,           NK'  	  up4      pVP	                  4       pRP                  RV R2RV R2RV R	2.4      p\        P                  ! \        VR
7      ;_uu_ 4        \        WA4      ! 4        RRR4       \        P                  ! \        VR
7      ;_uu_ 4        \        VP                  4       V4      ! RR7       RRR4       R# u upi   + '       g   i     Le; i  + '       g   i     R# ; i)r   r   r   |zreduction operation 'z' not allowed for this dtypezcannot perform z with type timedelta64\[ns\]zdoes not support operation ''rh   NF)numeric_only)r   r.   r   r   r   joinrj   rk   	TypeErrorrD   r   )rK   r=   r3   r   r   msgs   &&    r9   test_invalid_td64_reductions0TestIndexReductions.test_invalid_td64_reductionss  s    GLRyQy!Yz"Yqu%===yQ
 VVXhh'x/KL"6(*FG.vha8
 ]]9C00B! 1 ]]9C00BKKM6*> 10 R 10 100s   +DD"DD	D+	c                   Tp\        . ROVR7      pVP                  '       g   Q h\        R \        RR\        .VR7      pVP                  '       d   Q hW43 Fu  pVP                  4       \	        R VR7      8X  g   Q hVP                  4       \	        RVR7      8X  g   Q hVP                  4       ^ 8X  g   Q hVP                  4       ^8X  d   Ku  Q h	  R# )
2011-01-01
2011-01-02
2011-01-03r"   N)r   r   r   )r   r   r
   r?   r   r>   rv   rw   )rK   tz_naive_fixturer#   r   r   r6   s   &&    r9   test_minmax_tz"TestIndexReductions.test_minmax_tz  s    GBO+++++ 3lC@R
 /////<C779	,2 >>>>779	,2 >>>>::<1$$$::<1$$$	  rP   c                6   \        . 4      p\        \        W!4      ! 4       4      '       g   Q h\        \        .4      p\        \        W!4      ! 4       4      '       g   Q h\        \        \        \        .4      p\        \        W!4      ! 4       4      '       g   Q hR # r   )r   r   rD   r
   r   s   && r9   test_minmax_nat_datetime64.TestIndexReductions.test_minmax_nat_datetime64  su     BGC$&''''SE"GC$&''''S#sO,GC$&''''rP   c                   \        . RO4      pVP                  P                  4       p\        P                  ! V4      pW28X  g   Q hVP                  P	                  4       p\        P                  ! V4      pW28X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       VP                  P                  4       p\        P                  ! V4      pW28X  g   Q hVP                  P                  4       p\        P                  ! V4      pW28X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       R#   + '       g   i     ELT; i  + '       g   i     EL#; i  + '       g   i     L; i  + '       g   i     R# ; i)   r   rh   r   Nr   r      )
r	   rF   r>   r)   r?   rj   rk   rl   rw   rv   )rK   r6   rM   rL   r   s   &    r9   test_numpy_minmax_integer-TestIndexReductions.test_numpy_minmax_integer  s|   I::>>#!!!::>>#!!!7]]:V44FF3A 5]]:V44FF3A 5 ::$$&3!!!::$$&3!!!7]]:V44IIcq! 5]]:V44IIcq! 54! 544444 54444s0   $H)H H0%IH	H-	0I 	I	c                   \        ^ ^
^4      p\        P                  ! V4      pV^	8X  g   Q h\        P                  ! V4      pV^ 8X  g   Q hRp\        P
                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \        P
                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       R#   + '       g   i     LW; i  + '       g   i     R# ; i)r   r   rh   r   N)r   r)   r>   r?   rj   rk   rl   )rK   r6   rL   r   s   &   r9   test_numpy_minmax_range+TestIndexReductions.test_numpy_minmax_range  s    B"{{{{7]]:V44FF3A 5]]:V44FF3A 54 54444s   2C7C-C*	-C>	c                   \        R RR7      p\        P                  ! V4      \        R4      8X  g   Q h\        P                  ! V4      \        R4      8X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \        P                  ! V4      ^ 8X  g   Q h\        P                  ! V4      ^8X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L~; i  + '       g   i     R# ; i)	
2016-01-15
2016-01-20r   endz2016-01-15 00:00:00z2016-01-20 00:00:00r   rh   r   N)
r   r)   r?   r   r>   rj   rk   rl   rv   rw   )rK   drr   s   &  r9   test_numpy_minmax_datetime640TestIndexReductions.test_numpy_minmax_datetime64  s?   l=vvbzY'<====vvbzY'<====7]]:V44FF21 5 ]]:V44FF21 5 yy}!!!yy}!!!7]]:V44IIba  5 ]]:V44IIba  54 544 54 54 544s0    F.GGG(.F?	G	G%	(G9	c                >   \        \        R RR.RR7      pVP                  '       d   Q hVR,          P                  '       g   Q h\        R \        RR\        .RR7      pVP                  '       d   Q hW3 FG  pVP                  4       \	        R RR7      8X  g   Q hVP                  4       \	        RRR7      8X  d   KG  Q h	  VP                  4       ^8X  g   Q hVP                  4       ^ 8X  g   Q hVP                  4       ^8X  g   Q hVP                  4       ^8X  g   Q hR# )r   r   r   r$   r   :r   NNN)r   r
   r   r?   r   r>   rv   rw   r   s   &   r9   test_minmax_period&TestIndexReductions.test_minmax_period  s   C|\JQTU/////Bx///// 3lC@s
 /////<C779|# >>>>779|# >>>>   {{}!!!{{}!!!{{}!!!{{}!!!rP   datac                X    \        VR R7      p\        W14      ! 4       pV\        J g   Q hR# )Mr   N)r   rD   r
   )rK   r   r  r@   rL   s   &&&  r9   test_minmax_period_empty_nat0TestIndexReductions.test_minmax_period_empty_nat  s)     $S)!#}}rP   c                    \        R RR7      p\        P                  ! V4      \        R RR7      8X  g   Q h\        P                  ! V4      \        RRR7      8X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \        P                  ! V4      ^ 8X  g   Q h\        P                  ! V4      ^8X  g   Q hRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       \
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V^ R7       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L~; i  + '       g   i     R# ; i)	r   r   r   r$   r   r   rh   r   N)
r   r)   r?   r   r>   rj   rk   rl   rv   rw   )rK   prr   s   &  r9   test_numpy_minmax_period,TestIndexReductions.test_numpy_minmax_period  s9   ,?vvbzVLs;;;;vvbzVLs;;;;7]]:V44FF21 5]]:V44FF21 5 yy}!!!yy}!!!7]]:V44IIba  5]]:V44IIba  54 54444 54444s0   F2	G
GG,2G	G	G)	,G=	c                V   \         P                  ! \        R 4      \        R4      RR7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  4        RRR4       Rp\        P                  ! \
        VR7      ;_uu_ 4        VP                  4        RRR4       \         P                  ! \        R 4      \        R4      RR7      pVP                  4       R	8X  g   Q hVP                  4       R
8X  g   Q hR#   + '       g   i     L; i  + '       g   i     L~; i)aabbcacabF
categoriesorderedzwCategorical is not ordered for operation min\nyou can use .as_ordered\(\) to change the Categorical to an ordered one\nrh   NzwCategorical is not ordered for operation max\nyou can use .as_ordered\(\) to change the Categorical to an ordered one\nTcr{   )rW   CategoricalIndexlistrj   rk   r   r?   r>   )rK   cir   s   &  r9   test_min_max_categorical,TestIndexReductions.test_min_max_categorical!  s      hDKQVWY 	 ]]9C00FFH 1Y 	 ]]9C00FFH 1   hDKQUVvvx3vvx3 10 10s   DDD	D(	r   N))r   i  r   )i  r   i)@B    )r  r  )r   r      )skewkurtsemprodvar)r   r   r   r   rj   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r
   r  r  r  r   r   r   s   @r9   r   r      s4    
 [[	
		0% [[TE5>2	) 3	)!*36j [[X'MN? O?(%$ [[TE5>2	( 3	("@&!."( [[TE5>2[[Vb3%#sC%AB C 3!* rP   r   c                   ^  a  ] tR tRt o R t]P                  P                  R. R7O4      ]P                  P                  RRR.4      ]P                  P                  RR8R9.4      R	 4       4       4       t]P                  P                  R
RR.4      ]P                  P                  R. R:O4      R 4       4       t	]P                  P                  R
. R;O4      R 4       t
R t]P                  P                  RRR.4      ]P                  P                  RRR.4      R 4       4       t]P                  P                  RRR.4      ]P                  P                  RRR.4      R 4       4       tR t]P                  P                  RR<R=.4      R 4       tR t]P                  P                  RR>4      R 4       tR tR tR tR tR tR tR  tR! tR" tR# t]P                  P                  R$RR%.R%R.R]P:                  .]P:                  R..4      R& 4       t]P                  P                  R. R?O4      ]P                  P                  R'. R@ORR.RR..3. RAORR.RR..3]P@                  ]P@                  ]P@                  .]P@                  ]P@                  .RR..3^ ]P@                  ^ .]P@                  R.RR..3^]P@                  ^.R]P@                  .RR..3^]P@                  ^ .RR.RR..3.4      R( 4       4       t!R) t"R* t#R+ t$R, t%R- t&R. t'R/ t(R0 t)R1 t*R2 t+R3 t,R4 t-R5 t.R6t/V t0R%# )BTestSeriesReductionsi5  c                `   \        \        P                  P                  ^4      P	                  ^
4      4      pVP                  4       p\        P                  VR&   \        P                  VR&   \        P                  ! VP                  4       4      '       g   Q h\        P                  P                  ^4      P	                  R4      P                  R4      p\        P                  VR&   \        P                  ! V^R7      p\        P                  ! V4      P                  4       '       g   Q hR# )r   :rt      Nf4r   N)d   r(  ):NNNr   )r   r)   r0   r1   r2   copyinfrx   isinfr   rI   r   nansumall)rK   r   s2r5   rY   s   &    r9   test_sum_inf!TestSeriesReductions.test_sum_inf:  s    299((+;;B?@VVX#&&3xx    ii##A&66zBII$OFFD	mmCa(xx}  """"rP   r   r,   use_bottleneckTFzmethod, unitc                   VR9   d   \         P                  M\        P                  p\         P                  ! RV4      ;_uu_ 4        \        . VR7      p\        Wa4      ! 4       pWr8X  g   Q h\        Wa4      ! ^ R7      pWr8X  g   Q h\        Wa4      ! ^R7      p\        V4      '       g   Q h\        Wa4      ! RR7      pWr8H   \        Wa4      ! R^ R7      pWr8X  g   Q h\        Wa4      ! R^R7      p\        V4      '       g   Q h\        Wa4      ! R^ R7      pWr8X  g   Q h\        Wa4      ! R^R7      p\        V4      '       g   Q h\        V.VR7      p\        Wa4      ! 4       pWr8X  g   Q h\        Wa4      ! ^ R7      pWr8X  g   Q h\        Wa4      ! ^R7      p\        V4      '       g   Q h\        Wa4      ! RR7      pWr8H   \        Wa4      ! R^ R7      pWr8X  g   Q h\        Wa4      ! R^R7      p\        V4      '       g   Q h\        V^.VR7      p\        Wa4      ! 4       pVR8X  g   Q h\        Wa4      ! ^ R7      pVR8X  g   Q h\        Wa4      ! ^R7      pVR8X  g   Q h\        Wa4      ! RR7      pVR8X  g   Q h\        Wa4      ! R^ R7      pVR8X  g   Q h\        \        P                  ! R4      VR7      p\        W4      ! ^R	7      V8H  P                  4       '       g   Q h\        ^.VR7      p\        Wa4      ! ^R7      p\        V4      '       g   Q h\        Wa4      ! R^R7      p\        V4      '       g   Q h\        V.VR7      p\        Wa4      ! ^R7      p\        V4      '       g   Q h\        V^.VR7      p\        Wa4      ! ^R7      p\        V4      '       g   Q h R
R
R
4       R
#   + '       g   i     R
# ; i)Float32r1  r\   )	min_countTr]   )r^   r4  F      ?r   N)r3  rU   )r   r   )rW   rX   r)   rx   option_contextr   rD   r   r   emptyr-  )	rK   methodr!   r1  r   itemr   rL   r   s	   &&&&&    r9   
test_emptyTestSeriesReductions.test_emptyI  sT    !55ruu266/@@ r'AQ')F>!> Q'!4F>!>Q'!4F<<< Q't4FN Q'tqAF>!>Q'tqAF<<<Q'uBF>!>Q'uBF<<< vU+AQ')F>!> Q'!4F>!>Q'!4F<<< Q't4FN Q'tqAF>!>Q'tqAF<<< ay.AQ')FS= = Q'!4FS= =Q'!4FS= = Q't4FS= =Q'tqAFS= = 288G,E:BB'Q/47<<>>>>s%(AQ'!4F<<<Q'uBF<<<vU+AQ'!4F<<<ay.AQ'!4F<<<{ A@@@s   MN,,N=	r8  r   r"  c                    \        . VR 7      p\        W14      ! 4       pV\        P                  J g   Q h\        \        P                  .VR 7      p\        WQ4      ! 4       pV\        P                  J g   Q hR# r\   Nr   rD   rW   rX   )rK   r8  r   eserrL   nsers   &&&   r9   &test_ops_consistency_on_empty_nullable;TestSeriesReductions.test_ops_consistency_on_empty_nullable  s^     b&&( ruugU+&(rP   c                   \        \        \        R 7      V4      ! 4       p\        V4      '       g   Q h\        . RR 7      pVR8X  dS   RP	                  . RO4      p\
        P                  ! \        VR7      ;_uu_ 4        \        W14      ! 4        RRR4       R# \        W14      ! 4       pV\        J g   Q hR#   + '       g   i     R# ; i)r\   m8[ns]r"  r   rh   N)zoperation 'var' not allowedz.cannot perform var with type timedelta64\[ns\]z does not support operation 'var')	rD   r   floatr   r   rj   rk   r   r
   )rK   r8  rL   tdserr   s   &&   r9   test_ops_consistency_on_empty2TestSeriesReductions.test_ops_consistency_on_empty  s     e,f57F||| r*U?((C y44&( 54 U+-FS= =	 544s   >B77C	c                    \        R \        P                  .^ ^.R7      p\        P                  ! V4      p\        P
                  ! V^4       R# )r5  r(   N)r   r)   rx   r,  r   assert_almost_equal)rK   serrL   s   &  r9   test_nansum_buglet'TestSeriesReductions.test_nansum_buglet  s7    c266]1a&13
vq)rP   int32r+   c                   \         P                  ! R V4      ;_uu_ 4        \        P                  ! RVR7      p\	        V4      pVP                  RR7      p\        V4      VP                  RR7      8X  g   Q hVP                  RR7      p\        V4      ^ 8X  g   Q hVP                  RR7      p\        V4      VR,          8X  g   Q h RRR4       R#   + '       g   i     R# ; i)r1  @KL r\   Fr]   r+   N)	rW   r6  r)   r*   r   r   intr?   r>   rK   r1  r   vr   rL   s   &&&   r9   test_sum_overflow_int*TestSeriesReductions.test_sum_overflow_int  s     /@@ 		'/Aq	AUU%U(Fv;!%%g%"6666UU%U(Fv;!###UU%U(Fv;!B%''' A@@@s   B'CC#	float32c                   \         P                  ! R V4      ;_uu_ 4        \        P                  ! RVR7      p\	        V4      pVP                  RR7      pWSP                  VR7      8X  g   Q hVP                  RR7      p\        P                  ! \        V4      R4      '       g   Q hVP                  RR7      p\        P                  ! \        V4      VR,          4      '       g   Q h RRR4       R#   + '       g   i     R# ; i)r1  rQ  r\   Fr]           NrR  )
rW   r6  r)   r*   r   r   r?   allcloserE  r>   rT  s   &&&   r9   test_sum_overflow_float,TestSeriesReductions.test_sum_overflow_float  s     /@@		'/Aq	AUU%U(FUUU////UU%U(F;;uV}c2222UU%U(F;;uV}ae4444 A@@@s   C	C44D	c                    R p^dp\         P                  ! V.V,          4      p\        V.V,          RR7      p\         P                  ! V4      pVP                  4       pWe,
          ^ 8X  g   Q hVR8X  g   Q hR# )l     ;rU   r\   g ؅W4vCN)r)   rG   r   r   )rK   r`   
n_elementsnarL  result_numpyresult_maskeds   &      r9   test_mean_masked_overflow.TestSeriesReductions.test_mean_masked_overflow  sk    %
XXsej()cUZ'w7wwr{
+q000$$$rP   z	ddof, expc                    \        . RORR7      p\        . RORR7      pVP                  VR7      pVP                  VR7      pWV8X  g   Q hWR8X  g   Q hR# )r   rU   r\   r+   ddofN)r   r   r   r  rt   )r   r"  )rK   rg  exprL  ser_numpy_dtyperL   result_numpy_dtypes   &&&    r9   test_var_masked_array*TestSeriesReductions.test_var_masked_array  sV     _G4 @d#,00d0;+++}}rP   c                    \        . RO\        R7      pVP                  ^R7      R8X  g   Q hVP                  ^R7      R8X  g   Q hR# )              ?r\   rf  r5  N)y                             rn  )r   complexr"  r   rK   rL  s   & r9   test_var_complex_array+TestSeriesReductions.test_var_complex_array  s>    ]'2wwAw#%%%wwAw#%%%rP   c                    \        . VR 7      P                  VR7      \        J g   Q h\        . VR 7      P                  VR7      \        J g   Q hR# )r\   r]   N)r   r?   r
   r>   )rK   r   r^   s   &&&r9   +test_empty_timeseries_reductions_return_nat@TestSeriesReductions.test_empty_timeseries_reductions_return_nat  sJ     b&**&*9S@@@b&**&*9S@@@rP   c                   \         P                  ! ^^4      p\        WR7      p\         P                  ! V4      p\         P                  ! V4      pW48X  g   Q hVP                  4       pW48X  g   Q hRp\        P
                  ! \        VR7      ;_uu_ 4        \         P                  ! W!R7       RRR4       R#   + '       g   i     R# ; ir   rJ  r   rh   r   N)r)   r*   r   rv   rj   rk   rl   )rK   r  r   rL   rM   r   s   &     r9   test_numpy_argmin&TestSeriesReductions.test_numpy_argmin  s    yyB4$199T?!!!!!!4]]:S11IIa" 2111   B88C		c                   \         P                  ! ^^4      p\        WR7      p\         P                  ! V4      p\         P                  ! V4      pW48X  g   Q hVP                  4       pW48X  g   Q hRp\        P
                  ! \        VR7      ;_uu_ 4        \         P                  ! W!R7       RRR4       R#   + '       g   i     R# ; irx  )r)   r*   r   rw   rj   rk   rl   )rK   r  rL  rL   rM   r   s   &     r9   test_numpy_argmax&TestSeriesReductions.test_numpy_argmax/  s    yyBT&399T?!!!!!!4]]:S11IIc$ 2111r{  c                ,   \        . R	O4      P                  V4      p\        RR\        P                  .VR7      p\
        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       \
        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       VP                  4       p\
        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       \
        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lw; i  + '       g   i     R# ; i)
r
   r5  r   rJ  rg   rh   Fr]   N)r
   z
2015-02-08r
   )r   as_unitr   r)   rx   rj   rk   rl   idxminidxmaxr   )rK   r!   dtirL  r   s   &&   r9   test_idxmin_dt64index*TestSeriesReductions.test_idxmin_dt64index@  s    89AA$Gc3's3]]:-FGGJJeJ$ H]]:-FGGJJeJ$ H \\^]]:-FGGIIUI# H]]:-FGGIIUI# HG HGGG HGGGGs0   E	E-E/,F	E	E,	/E?	F	c                0   \        \        ^4      \        P                  RR7      p\        P                  VR&   WP                  4       ,          VP                  4       8X  g   Q h\        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       VP                  4       pW"P                  4       ,          VP                  4       8X  g   Q hVP                  P                  P                  4       P                  VP                  4       4      VP                  P                  4       8X  g   Q hV\        P                  ,          pR	p\        P                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        \        R
^R7      4      pVP                  4       pV^ 8X  g   Q h\        P                  V^ &   VP                  4       pV^8X  g   Q hR#   + '       g   i     EL_; i  + '       g   i     L; i)r  r7   r   rt      Nrg   rh   Fr]   Nru   20130102r    )r   r.   r)   r,   rx   r  r?   rj   rk   rl   r   r(   rF   tolistrv   r   rK   string_seriesnonaallnar   r   rL   s   &      r9   test_idxmin TestSeriesReductions.test_idxminO  s|    uRy

J !ffd 11348I8I8KKKK]]:-FGG   . H ##%KKM"dhhj000zz  '')//>$++BTBTBVVVV &)]]:S11LLN 2 :j!45{{vv!{{+ HGG 21s   G1;H1H	H	c                ~   \        \        ^4      \        P                  RR7      p\        P                  VR&   WP                  4       ,          VP                  4       8X  g   Q h\        P                  ! \        RR7      ;_uu_ 4        \        VP                  RR7      4      '       g   Q h RRR4       VP                  4       pW"P                  4       ,          VP                  4       8X  g   Q hVP                  P                  P                  4       P                  VP                  4       4      VP                  P                  4       8X  g   Q hV\        P                  ,          pR	p\        P                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        \!        R
^R7      4      pVP                  4       pV^8X  g   Q h\        P                  V^&   VP                  4       pV^8X  g   Q h\        . RO. RO4      pVP                  4       pVR8X  g   Q hVP#                  4       pVR8X  g   Q h\        VP                  VP                  4      pVP                  4       pVR8X  g   Q hVP#                  4       pVR8X  g   Q hR#   + '       g   i     EL; i  + '       g   i     EL; i)r  r7   r   r  rg   rh   Fr]   Nru   r  r  皙?@r   )r  g @r  )r   r.   r)   r,   rx   r  r>   rj   rk   rl   r   r   r(   rF   r  rw   r   r  r  s   &      r9   test_idxmax TestSeriesReductions.test_idxmaxp  s    uRy

J !ffd 11348I8I8KKKK]]:-FGG,,E,:;;;; H ##%KKM"dhhj000zz  '')//>$++BTBTBVVVV &)]]:S11LLN 2 :j!45{{vv!{{ 9o.}}}}177AGG$}}}}E HGG 211s   $JJ+J(	+J<	c                4   \        \        P                  ! ^
\        P                  R7      \	        R^
R7      RR7      pV^ 8  pVP                  4       '       d   Q hVP                  4       '       g   Q h\        RR.4      pVP                  4       '       g   Q hR# )	r   r\   r   r  tsr'   abcTN)r   r)   r*   r,   r   r-  any)rK   r  bool_seriesr   s   &   r9   test_all_any!TestSeriesReductions.test_all_any  s{    IIb

+\26

 1f??$$$$     E4=!uuwwwrP   c                    V! . RO4      p\         P                  ! V4      '       d   Q h\         P                  ! V4      '       g   Q h\        . RO4      p\         P                  ! V4      '       g   Q hR# )r   N)r   r   r   r   )r)   r-  r  r	   )rK   ra   r6   s   && r9   test_numpy_all_any'TestSeriesReductions.test_numpy_all_any  sL    i(66#;;vvc{{{Ivvc{{{rP   c                B   \        \        P                  R .4      p\        \        P                  R.4      pVP                  RR7      '       g   Q hVP                  R R7      '       g   Q hVP	                  RR7      '       g   Q hVP	                  R R7      '       d   Q hR# )TFr]   N)r   r)   rx   r-  r  )rK   s1r.  s   &  r9   test_all_any_skipna(TestSeriesReductions.test_all_any_skipna  s    RVVTN#RVVUO$vvUv####vvTv""""vvUv####666&&&&&rP   c                    \        . RO. ROR7      pVP                  RR7      '       g   Q hVP                  RR7      '       d   Q hR# )FTrJ  )	bool_onlyN)FFTTFT)r   r   r   r   r   r   )r   r  r-  rK   r   s   & r9   test_all_any_bool_only+TestSeriesReductions.test_all_any_bool_only  sC    :BTU uutu$$$$5545(((((rP   c                d    \        . RO\        R7      p\        W14      ! VR7      pRpWE8X  g   Q hR# )r   r\   r]   TN)r   r{   r  de)r   r_   rD   )rK   all_boolean_reductionsr^   rL  rL   rM   s   &&&   r9   test_any_all_object_dtype.TestSeriesReductions.test_any_all_object_dtype  s/    .f=5VD!!!rP   r  Nc                t    \        V4      p\        W24      ! R R7      pVR8H  ;'       d    RV9  pWE8X  g   Q hR# )Fr]   r  N)r   rD   )rK   r  r  rL  rL   rM   s   &&&   r9   !test_any_all_object_dtype_missing6TestSeriesReductions.test_any_all_object_dtype_missing  sA    
 Tl5UC *U2GGt47G!!!rP   zdata,expected_datac                    \        W4R 7      pWR,          VR8H  ,          p\        Wa4      ! VR7      pV\        P                  J d   V\        P                  J g   W8X  g   Q hR# R# )r\   r-  r]   Nr>  )	rK   r  r^   r  r   expected_datarL  rM   rL   s	   &&&&&&   r9   "test_any_all_nullable_kleene_logic7TestSeriesReductions.test_any_all_nullable_kleene_logic  sW    $ T' ()?5)HI5VD"%%H$5&:LLL:L$5rP   c                    \        R RR.R^^./4      pVP                  ^RR7      p\        RR.4      p\        P                  ! W#4       R# )r   TFr   )r   r  N)r   r  r   r   r   )rK   r   rL   rM   s   &   r9   test_any_axis1_bool_only-TestSeriesReductions.test_any_axis1_bool_only  sK    dE]C!Q89Q$/4-(
v0rP   c                \
   \        R ^R7      P                  p\        V4      p\        V4      pRp\        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4       P                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4       P                  4        RRR4       VP                  R4      p\        V4      p\        V4      p\        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4       P                  4        RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  4       P                  4        RRR4       W^ ,          ,
          p\        V4      p\        V4      pVP                  4       '       g   Q hVP                  4       '       d   Q hVP                  4       '       g   Q hVP                  4       '       d   Q hVP                  4       P                  4       '       g   Q hVP                  4       P                  4       '       d   Q hR#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELg; i  + '       g   i     EL0; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELW; i  + '       g   i     EL.; i  + '       g   i     EL; i  + '       g   i     EL; i)z
1995-01-02r  z6datetime64 type does not support operation '(any|all)'rh   Nr}   )
r   _datar   r   rj   rk   r   r-  r  r-   )rK   dtarL  r   r   tdas   &     r9   test_any_all_datetimelike.TestSeriesReductions.test_any_all_datetimelike  s    q177Sks^ G]]9C00GGI 1]]9C00GGI 1 ]]9C00GGI 1]]9C00GGI 1 ]]9C00FFHLLN 1]]9C00FFHLLN 1 ooe$Sks^]]9C00GGI 1]]9C00GGI 1 ]]9C00GGI 1]]9C00GGI 1 ]]9C00FFHLLN 1]]9C00FFHLLN 1 FlSks^wwyyy7799}wwyyy7799}vvx||~~~668<<>>!!>[ 100000 100000 100000 100000 100000 100000s   P>QQ&Q:RR"R6S
?S<S29TT>Q	Q#	&Q7	:R	R	"R3	6S	
S	S/	2T	T	T+	c                v   \        V\        P                  4      '       d   VP                  \        P                  J d   \        R R.VR7      p\        P                  ! \        4      ;_uu_ 4        VP                  4        RRR4       \        P                  ! \        4      ;_uu_ 4        VP                  4        RRR4       R# \        RR .VR7      pVP                  4       '       g   Q hVP                  4       '       d   Q hVP                  RR7      '       g   Q hVP                  RR7      '       d   Q h\        \        P                  R .VR7      pVP                  4       '       g   Q hVP                  4       '       g   Q hVP                  RR7      '       g   Q hVP                  RR7      '       g   Q h\        \        P                  R.VR7      pVP                  4       '       d   Q hVP                  4       '       d   Q hVP                  RR7      '       g   Q hVP                  RR7      '       d   Q h\        R R.VR7      pVP                  4       '       g   Q hVP                  4       '       g   Q hVP                  RR7      '       g   Q hVP                  RR7      '       g   Q h\        . VR7      pVP                  4       '       d   Q hVP                  4       '       g   Q hVP                  RR7      '       d   Q hVP                  RR7      '       g   Q h\        R.VR7      pVP                  4       '       d   Q hVP                  4       '       d   Q hVP                  RR7      '       d   Q hVP                  RR7      '       d   Q h\        \        P                  .VR7      pVP                  4       '       d   Q hVP                  4       '       g   Q hVP                  RR7      '       g   Q hVP                  RR7      '       g   Q hR#   + '       g   i     EL; i  + '       g   i     R# ; i)r   r{   r\   N Fr]   )rE   rW   StringDtypena_valuerX   r   rj   rk   r   r  r-  r)   rx   )rK   any_string_dtyperL  s   && r9   test_any_all_string_dtype.TestSeriesReductions.test_any_all_string_dtype/  s,    '88 ))RUU2 #s+;<Cy))	 *y))	 *b#Y&67wwyyy7799}wwew$$$$77%7((((bffc]*:;wwyyywwyyywwew$$$$wwew$$$$bffb\)9:7799}7799}wwew$$$$77%7((((c3Z'78wwyyywwyyywwew$$$$wwew$$$$R/07799}wwyyy77%7((((wwew$$$$bT!127799}7799}77%7((((77%7((((bffX%567799}wwyyywwew$$$$wwew$$$$] *))))s   0P+P'P$	'P8	c                   \        R ^RR7      p\        V4      \        R4      ,
          pVP                  4       pV^ 8X  g   Q hVP	                  4       pV^8X  g   Q h\
        P                  V^ &   VP                  4       pV^8X  g   Q hVP	                  4       pV^8X  g   Q h\        \        R^R7      4      p\        \        R^R7      4      p\        WT,
          4      p\
        P                  ! WE,
          4      p\        P                  ! W64       WE,
          P                  4       p\        P                  ! W64       VP                  4       p\        R4      pW68X  g   Q hVP                  4       p\        R4      pW68X  g   Q hR# )	z2012-1-1r$   r%   20120101r  20120102r   r   N)r   r   r   r  r  r)   rx   absr   r   r>   r   r?   )rK   r  r   rL   r  r.  rM   s   &      r9   test_timedelta64_analytics/TestSeriesReductions.test_timedelta64_analyticsh  s9   QS9C[9Z00{{{{ 1{{{{ Jz156Jz156"'?
v0'
v0 X&!!!X&!!!rP   c                   \        . RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP	                  4        RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP	                  RR7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lw; i  + '       g   i     R# ; i)	zE
Cases where ``Series.argmax`` and related should raise an exception
r,   r\   z*attempt to get argmin of an empty sequencerh   NFr]   z*attempt to get argmax of an empty sequence)r   rj   rk   rl   r  r  )rK   
test_inputr   s   &  r9   "test_assert_idxminmax_empty_raises7TestSeriesReductions.test_assert_idxminmax_empty_raises  s     Bi0
:]]:S11 2]]:S11U+ 2:]]:S11 2]]:S11U+ 21 2111 21111s/   D1D2D2/ED	D/	2E	E	c           	        \        . R	O4      pVP                  4       ^ 8X  g   Q hVP                  RR7      ^ 8X  g   Q hVP                  4       ^8X  g   Q hVP                  RR7      ^8X  g   Q h\        R
R.4      pVP                  4       ^8X  g   Q hVP                  RR7      ^8X  g   Q hVP                  4       ^ 8X  g   Q hVP                  RR7      ^ 8X  g   Q hV'       Eg   \        R R RRR\        P                  R.4      pRp\
        P                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \
        P                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       Rp\
        P                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       \
        P                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       R# R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Ly; i  + '       g   i     R# ; i)foobarbazFr]   Nz8'>' not supported between instances of 'float' and 'str'rh   z8'<' not supported between instances of 'float' and 'str')r  r  r  )r   )r   )r   r  r  r)   rx   rj   rk   r   )rK   using_infer_stringrL  ser2ser3r   s   &&    r9   test_idxminmax_object_dtype0TestSeriesReductions.test_idxminmax_object_dtype  s   *+zz|q   zzz'1,,,zz|q   zzz'1,,,tTl#{{}!!!{{%{(A---{{}!!!{{%{(A---!!5%tRVVUKLDLCy44 5y445) 5LCy44 5y445) 54 " 5444 54444s0   *H'H(H*%H=H	H'	*H:	=I	c                    \        R R.RR.RR..4      pVP                  4       p\        ^ ^.4      p\        P                  ! W#4       R# )zimm      @biffr5  bidg      (@N)r   r  r   r   r   )rK   r   rY   rh  s   &   r9   test_idxminmax_object_frame0TestSeriesReductions.test_idxminmax_object_frame  sE    }udmDEiikaVn
s(rP   c                    \        . RO4      pVP                  4       ^8X  g   Q hVP                  4       ^ 8X  g   Q hVP                  RR7      ^8X  g   Q hVP                  RR7      ^ 8X  g   Q hR# )r   Fr]   N))r   r   )r   r   )r   r   )r   r  r  rq  s   & r9   test_idxminmax_object_tuples1TestSeriesReductions.test_idxminmax_object_tuples  sg    -.zz|q   zz|q   zzz'1,,,zzz'1,,,rP   c                H   \        R ^ ^.R\        R4      \        R4      .R\        R4      \        R4      ./4      pVP                  4       p\        R ^R^R^/4      p\        P
                  ! W#4       VP                  4       pV^,
          p\        P
                  ! WE4       R# )r6   xz8.68z42.23yz7.11z79.61N)r   r   r  r   r   r   r  )rK   r   rY   rh  res2exp2s   &     r9   test_idxminmax_object_decimals3TestSeriesReductions.test_idxminmax_object_decimals  s    1vgfoww'78gfoww'78
 iikeQQQ/0
s(yy{Qw
t*rP   c                    \        ^ ^.RR7      pVP                  4       ^8X  g   Q hVP                  4       ^ 8X  g   Q hVP                  RR7      ^8X  g   Q hVP                  RR7      ^ 8X  g   Q hR# )r   r_   r\   Fr]   N)r   rw   rv   rq  s   & r9   test_argminmax_object_ints/TestSeriesReductions.test_argminmax_object_ints  sl    aV8,zz|q   zz|q   zzz'1,,,zzz'1,,,rP   c                    \        ^ \        P                  ) \        P                  \        P                  .4      pVP	                  4       ^8X  g   Q h\
        P                  ! \        RR7      ;_uu_ 4        VP	                  RR7       RRR4       VP                  4       ^8X  g   Q h\
        P                  ! \        RR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     Lh; i  + '       g   i     R# ; i)r   rg   rh   Fr]   N)	r   r)   r*  rx   r  rj   rk   rl   r  r  s   & r9   test_idxminmax_with_inf,TestSeriesReductions.test_idxminmax_with_inf  s    Aw/0xxzQ]]:-FGGHHEH" H xxzQ]]:-FGGHHEH" HG	 HG HGGs   6C)C<)C9	<D	c                    \        R .RR7      pVP                  4       p\        P                  ! R 4      p\        P
                  ! W#4       R# )l     9V uint64r\   N)r   r   r)   r  r   rK  )rK   r   rL   rM   s   &   r9   test_sum_uint64$TestSeriesReductions.test_sum_uint64  s:    ():9912
v0rP   c                    \        . RO4      pVP                  R4      P                  4       pV'       d   \        V\        4      '       g   Q hR# \        V\
        P                  4      '       g   Q hR# )r   uint8N)r   r   r   r  )r   rI   r   rE   rS  r)   r  )rK   using_python_scalarsrL  rL   s   &&  r9   #test_signedness_preserved_after_sum8TestSeriesReductions.test_signedness_preserved_after_sum  sP    \"G$((*fc****fbii0000rP   r   )r,   r3  rU   rV   r_   )r   rZ  )r!  r5  )Float64rU   rV   )r   r   r   r"  )r   r  )r   r   )rD  rC   zM8[ns, UTC])rV   rU   UInt64r  )r   r   r   )r   r   r   )1r   r   r   r   r/  rj   r   r   r:  rA  rG  rM  rV  r\  rc  rk  rr  ru  ry  r}  r  r  r  r  r  r  r  r  r)   rx   r  rW   rX   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r   s   @r9   r$  r$  5  s    
# [[E [[-e}=[[^lM-JK_  L >
_ B [[X7[[W&EF G 8 [[X'GH! I!0*
 [[-e}=[[Ww&89( : >( [[-e}=[[Wy)&<=
5 > >
5
% [[[8X*>? @& [[W&IJA KA
#$%"$B,\')" [[%urvvP"" [[W&OP[[ 	%%89$d|45eeRUUBEE"beeRUU^eT]$CD]beeU^eU^<=]dBEE]T4L9:]dE]T5M:;	
	M QM16"p7%r'"R, *8)-+"-
#11 1rP   r$  c                   D  a  ] tR tRt o ]P
                  P                  R]! ]].4      ]! ]]	! R4      .4      ]! ]	! R4      ]	! R4      .4      .4      R 4       t
]P
                  P                  R]].]]	! R4      .]	! R4      ]	! R4      ..4      R 4       tR tR tR	tV tR
# )TestDatetime64SeriesReductionsi  nat_sernatc                    VP                  4       \        J g   Q hVP                  4       \        J g   Q hVP                  R R7      \        J g   Q hVP                  R R7      \        J g   Q hR# r   )r?   r
   r>   )rK   r  s   &&r9   test_minmax_nat_series5TestDatetime64SeriesReductions.test_minmax_nat_series  s^     {{}###{{}###{{%{(C///{{%{(C///rP   nat_dfc                ,   \        V4      pVP                  4       ^ ,          \        J g   Q hVP                  4       ^ ,          \        J g   Q hVP                  RR7      ^ ,          \        J g   Q hVP                  RR7      ^ ,          \        J g   Q hR# )r   Fr]   N)r   r?   r
   r>   )rK   r  s   &&r9   test_minmax_nat_dataframe8TestDatetime64SeriesReductions.test_minmax_nat_dataframe  sz     6"zz|A#%%%zz|A#%%%zzz'*c111zzz'*c111rP   c                   \        R R4      pVP                  \        P                  P	                  ^4      P                  \        V4      4      4      pVP                  4       pVP                  4       p\        V\        4      '       g   Q h\        V\        4      '       g   Q hW1^ ,          8X  g   Q hWAR,          8X  g   Q hVP                  4       V^ ,          8X  g   Q hVP                  4       VR,          8X  g   Q hR# )1/1/2000z
12/31/2000NrR  )r   taker)   r0   r1   permutationlenr?   r>   rE   r   )rK   rngrng2the_minthe_maxs   &    r9   test_min_max+TestDatetime64SeriesReductions.test_min_max'  s    \2xx		--a0<<SXFG((*((*'9----'9----a&   b'!!!wwyCF"""wwyCG###rP   c           
     6   \        R ^
RR7      p. ROp\        RVR\        P                  P	                  ^4      P                  \        V4      4      RV/4      pVP                  P                  4       p\        VP                  P                  R,          4      p\        V\        4      '       g   Q hWE8X  g   Q hVP                  P                  4       p\        VP                  P                  ^ ,          4      p\        V\        4      '       g   Q hWE8X  g   Q hR# )	r  4hr%   TSVLN)
r   r   r   r   r   r   Cr  r  r  rR  )r   r   r)   r0   r1   r2   r  r  r>   r   iatrE   r?   )rK   r  lvlsr   rL   rh  s   &     r9   test_min_max_series2TestDatetime64SeriesReductions.test_min_max_series5  s    Rd;AcRYY**1-==c#hGT
 		"&&),,,,}}		!%&),,,,}}rP   r   N)r   r   r   r   rj   r   r   r   r
   r   r  r  r  r  r   r   r   s   @r9   r  r    s     
 [[C:C5)*+Ie$i&678	
00 [[#J)E"#uy/0	
22$ rP   r  c                   (  a  ] tR tRt o ]P
                  P                  RRR.4      R 4       t]P
                  P                  R]! R4      ]! R4      3]! R4      ]! R4      3. ]! R4      O]	P                  N]! R4      3. RO. RO3^^^]	P                  .. RO3.4      ]P
                  P                  RRR.4      R	 4       4       t]P
                  P                  RRR.4      R
 4       t]P
                  P                  RRR.4      R 4       tRtV tR# )TestCategoricalSeriesReductionsiK  functionr?   r>   c                    \        \        . RORR7      4      pRV 2p\        P                  ! \        VR7      ;_uu_ 4        \        W!4      ! 4        RRR4       R#   + '       g   i     R# ; i)r   F)r  z)Categorical is not ordered for operation rh   N)r   r{   r  r  )r   r   rj   rk   r   rD   )rK   r  catr   s   &&  r9   test_min_max_unordered_raises=TestCategoricalSeriesReductions.test_min_max_unordered_raisesP  sM     [!5uEF9(D]]9C00C"$ 1000s   AA.	zvalues, categoriesr  cbac                    \        \        WR R7      4      p\        WC4      ! R R7      pVR8X  d
   V^ ,          MV^,          pWV8X  g   Q hR# )Tr  r]   r?   N)r   r   rD   )rK   rF   r  r  r   rL   rM   s   &&&&   r9   test_min_max_ordered4TestCategoricalSeriesReductions.test_min_max_orderedX  sF     [MN't4$,$5:a=:a=!!!rP   c                    \        \        \        P                  .^^.RR7      4      p\	        W14      ! VR7      pV\        P                  J g   Q hR# )r   Tr  r]   Nr   r   r)   rx   rD   )rK   r  r^   r   rL   s   &&&  r9   "test_min_max_ordered_with_nan_onlyBTestCategoricalSeriesReductions.test_min_max_ordered_with_nan_onlyj  sB     ["&&q!fdKL'v6rP   c                    \        \        R R\        P                  R .RR .RR7      4      p\	        W14      ! VR7      pVRJ d   VR8X  d   RMR pWE8X  g   Q hR# V\        P                  J g   Q hR# )r   r{   Tr  r]   r?   Nr(  )rK   r  r^   r   rL   rM   s   &&&   r9   test_min_max_skipna3TestCategoricalSeriesReductions.test_min_max_skipnaq  sn    c2663/S#JPTU
 'v6T>&%/sSH%%%RVV###rP   r   Nr   r   r   r   )r   r   r   r   rj   r   r   r!  r  r)   rx   r%  r)  r,  r   r   r   s   @r9   r  r  K  s%    
 [[Z%8% 9% [[%[$u+&%[$u+&#tE{#BFF#T%[1	"Arvv	*	
	 [[Z%8" 9	" [[Z%8  9  [[Z%8
$ 9
$rP   r  c                   @  a  ] tR tRt o R t]P                  P                  RR. R%O^.3R. R&O^^.3R. R%O^.3R. R&O^^.3.4      R 4       t]P                  P                  RRR.3R^]	P                  .3.4      R	 4       t]P                  P                  R
RR.R.3RR.]	P                  .3.4      R 4       t]P                  P                  R
RR.R.3RR.]	P                  .3.4      R 4       t]P                  P                  R
RR.R.3RR.]	P                  .3.4      R 4       t]P                  P                  R
R. R'ORR.3R]	P                  .]	P                  RR.3.4      R 4       t]P                  P                  R
R. R(ORR.3R]	P                  .]	P                  RR.3.4      R 4       t]P                  P                  RR]! ^^.^^.R7      ]! R.^R.R7      ]! ^^.. R)ORR7      3R]! ]	P                  .^^.R7      ]! ]	P                  R.^R.R7      ]! ]	P                  ^^.. R)ORR7      3.4      R 4       t]P                  P                  R
RR*.^R*.3RR*.^R*.3.4      R 4       tR tR t]P                  P                  R. R,O^.]	P,                  3. R,O^.]	P.                  3. R-OR+.]	P,                  3.4      R! 4       t]P                  P                  R. R.O. R/O]	P,                  3. R0OR R+.]	P.                  3.4      R" 4       tR#tV tR$# )1TestSeriesModei  c                    \        . \        P                  R 7      pVP                  V4      p\        P
                  ! W24       R# r=  )r   r)   r,   moder   r   )rK   r   r   rL   s   &&  r9   test_mode_emptyTestSeriesMode.test_mode_empty  s-    2RZZ(
v)rP   zdropna, data, expectedTFc                    \        W$R 7      pVP                  V4      p\        W4R 7      p\        P                  ! Wc4       R# r=  r   r2  r   r   )rK   r   r  rM   any_real_numpy_dtyper   rL   s   &&&&&  r9   test_mode_numerical"TestSeriesMode.test_mode_numerical  s3     44(?
v0rP   zdropna, expectedr5  c                    \        ^^^\        P                  \        P                  .4      pVP                  V4      p\        V4      p\        P
                  ! WB4       R# )r   N)r   r)   rx   r2  r   r   )rK   r   rM   r   rL   s   &&&  r9   test_mode_numerical_nan&TestSeriesMode.test_mode_numerical_nan  sD    Aq!RVVRVV,-(#
v0rP   zdropna, expected1, expected2r{   r  c                   R .^,          R.^,          ,           p\        VRR7      pVP                  V4      p\        VRR7      p\        P                  ! Wb4       RRR\        P
                  \        P
                  \        P
                  .p\        V\        R7      pVP                  V4      p\        V\        R7      p\        P                  ! Wc4       R# )r   r{   r  r\   r  r  N)r   r2  r   r   r)   rx   r_   )rK   r   	expected1	expected2r  r   rL   s   &&&&   r9   test_mode_objectTestSeriesMode.test_mode_object  s     uqyC519$4s#9C0	
v1ueRVVRVVRVV<4v&9F3	
v1rP   c                   R .^,          R.^,          ,           p\        WTR7      pVP                  V4      p\        W$R7      p\        P                  ! Wr4       RRR\        P
                  \        P
                  \        P
                  .p\        WTR7      pVP                  V4      p\        W4R7      p\        P                  ! Ws4       R# )r   r{   r\   r  r  N)r   r2  r   r   r)   rx   )rK   r   r>  r?  r  r  r   rL   s   &&&&&   r9   test_mode_stringTestSeriesMode.test_mode_string  s     uqyC519$409=	
v1ueRVVRVVRVV<409=	
v1rP   r  c                v   \        . RO4      pVP                  V4      p\        V\        R7      p\        P                  ! WV4       \        ^RR\
        P                  \
        P                  \
        P                  .4      pVP                  V4      p\        V\        R7      p\        P                  ! WV4       R# )r   r  r\   N)r   r  r  )r   r2  r_   r   r   r)   rx   )rK   r   r>  r?  r   rL   rM   s   &&&&   r9   test_mode_mixeddtype#TestSeriesMode.test_mode_mixeddtype  s    
 $%)62
v0AueRVVRVVRVV<=)62
v0rP   r   
2013-01-02c                   \        . RORR7      pVP                  V4      p\        VRR7      p\        P                  ! WR4       \        . RORR7      pVP                  V4      p\        VRR7      p\        P                  ! WS4       R# )r   rC   r\   N)r   rH  
1900-05-03rx   rx   )r   rH  rJ  r   rH  rx   rx   r6  rK   r   r>  r?  r   rL   s   &&&&  r9   test_mode_datetime!TestSeriesMode.test_mode_datetime  sy     DH
 9H5	
v1 
 9H5	
v1rP   2 min1 dayc                   \        . RORR7      pVP                  V4      p\        VRR7      p\        P                  ! WR4       \        . RORR7      pVP                  V4      p\        VRR7      p\        P                  ! WS4       R# )r   r   r\   N)r   -1 days0 daysrx   rx   )rO  rO  z-1 dayz-1 day 2 minrN  rN  rx   rx   r6  rK  s   &&&&  r9   test_mode_timedelta"TestSeriesMode.test_mode_timedelta  s|     9AR
 9,=>	
v1	 $
 9,=>	
v1rP   z'dropna, expected1, expected2, expected3)r  r   r  c                   \        \        ^^\        P                  \        P                  .4      4      pVP	                  V4      p\        VRR7      p\
        P                  ! Wb4       \        \        ^RR\        P                  \        P                  .4      4      pVP	                  V4      p\        VRR7      p\
        P                  ! Wc4       \        \        ^^^^^\        P                  \        P                  .. RORR7      4      pVP	                  V4      p\        VRR7      p\
        P                  ! Wd4       R# )r   categoryr\   r   Tr  Nr.  )r   r   r)   rx   r2  r   r   )rK   r   r>  r?  	expected3r   rL   s   &&&&&  r9   test_mode_category!TestSeriesMode.test_mode_category!  s    $ ;1bffbff5679J7	
v1;3RVVRVV<=>9J7	
v1Aq!Q/It

 9J7	
v1rP   c                   \        . RO\        P                  R7      pVP                  V4      p\        V\        P                  R7      p\        P
                  ! WR4       \        ^R.\        P                  R7      pVP                  V4      p\        V\        P                  R7      p\        P
                  ! WS4       R# )r   r\   N            )r   r[  r[  )r   r)   r  r2  r   r   rK  s   &&&&  r9   test_mode_intoverflow$TestSeriesMode.test_mode_intoverflowF  s     $BII69BII6	
v1Au:RYY/9BII6	
v1rP   c                    \        ^RR\        P                  \        P                  .4      p\        R\        P                  .\        R7      pVP	                  RR7      p\
        P                  ! W24       R# )r   r  r\   F)r   N)r   r)   rx   r_   r2  r   r   )rK   r   rM   rL   s   &   r9   test_mode_sort_with_na%TestSeriesMode.test_mode_sort_with_naV  sQ    AueRVVRVV455"&&/8u%
v0rP   c                    \        R RR \        P                  .RR7      pVP                  4       p\        R .RR7      p\        P
                  ! W#4       R# )TFrV   r\   N)r   rW   rX   r2  r   r   )rK   rL  rL   rM   s   &   r9   test_mode_boolean_with_na(TestSeriesMode.test_mode_boolean_with_na\  sB    dE4/yA4&	2
v0rP   zarray,expected,dtype               @c                ~    \        WR 7      P                  4       p\        W#R 7      p\        P                  ! WB4       R# r=  r6  rK   rG   rM   r   rL   s   &&&& r9   test_single_mode_value_complex-TestSeriesMode.test_single_mode_value_complexc  s/    * +002(0
v0rP   c                ~    \        WR 7      P                  4       p\        W#R 7      p\        P                  ! WB4       R# r=  r6  rf  s   &&&& r9   test_multimode_complex%TestSeriesMode.test_multimode_complex|  s/    ( +002(0
v0rP   r   N)r   r   r   r   )r   r   r   r   r   r   r   )rJ  r   rH  )rQ  rR  r   r.  r[        ?      ?)r   rn  r   r   rl        ?       @)rl  rd  rl  )r   rn  r   rl  rm  )ro  rn  y      ?        rl  rm  )rl  rd  rl  rd  r   )r   r   r   r   r3  rj   r   r   r8  r)   rx   r;  r@  rC  rF  rL  rS  r   rX  r\  r_  rb  
complex128	complex64rg  rj  r   r   r   s   @r9   r0  r0    s    
*
 [[ <!%(1a&1L1#&)Aq62		
11 [[/4#-%!RVVAU1VW1 X1 [[&C55'"SEBFF8$	
22  [[&C55'"SEBFF8$	
22  [[&
%	!EE7RVVH#=>	1		1 [[& :|,
 RVVHrvv|\BC	

2
20 [[&2Wg4FGRVVHrvvw89	
226 [[1 QF1v6SEq#h7QFy$G	 RVVH!Q8RVVSMq#h?RVVQNy$O		
"2#"2( [[&
!U	$uug5z&BC
2	
211 [[ . . %	
(1)(1
 [[ +0	 ,V	
 1! 1rP   r0  )(r   r   decimalr   numpyr)   rj   pandasrW   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   pandas._testing_testingr   pandas.corer   pandas.core.arrays.string_arrowr   r:   r<   r   r$  r  r  r0  r   rP   r9   <module>rw     s           &   <(m1 m1`K K\
K1 K1\E EP1$ 1$hS1 S1rP   