+
    xȇi#                     N   ^ RI t ^ RIHtHtHt ^ RIHt ] P                  P                  RRR.4      R 4       t
R tR tR tR t] P                  P                  R	RR
.4      R 4       tR tR t] P                  P                  R. RO. RO3. RO. RO3.4      R 4       tR tR tR# )    N)	DataFrameIndexSerieszn, fracc                    ^.^
,          ^.^
,          ,           p\        RVRV/4      pVP                  R4      P                  WR7      p^.^,          ^.^,          ,           p\        RVRV/VP                  R7      p\        P
                  ! WE4       VP                  R4      R,          P                  WR7      p\        VRVP                  R7      p\        P                  ! WE4       R# )   abnfracindexnamer   Nr   groupbysampler   tmassert_frame_equalr   assert_series_equal)r   r   valuesdfresultexpecteds   &&    x/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/groupby/methods/test_sample.py)test_groupby_sample_balanced_groups_shaper      s    S2Xb F	Cf-	.BZZ_##a#3FS1WsQwF#vsF36<<HH&+ZZ_S!((1(8Ff3fll;H6,    c                     ^.^
,          ^.^,          ,           p \        RV RV /4      pVP                  R4      P                  ^R7      p^.^,          ^.^,          ,           p \        RV RV /VP                  R7      p\        P
                  ! W#4       VP                  R4      R,          P                  ^R7      p\        V RVP                  R7      p\        P                  ! W#4       R# )r   r   r	   r   r   r   Nr   r   r   r   r   s       r   +test_groupby_sample_unbalanced_groups_shaper!      s    S2Xb F	Cf-	.BZZ_##a#(FS1WsQwF#vsF36<<HH&+ZZ_S!((1(-Ff3fll;H6,r   c                     ^.^,          ^.^,          ,           p \        RV RV /. ROR7      pVP                  R4      P                  ^R7      p^.^,          ^.^,          ,           p \        RV RV /VP                  R7      p\        P
                  ! W#4       VP                  R4      R,          P                  ^R7      p\        V RVP                  R7      p\        P                  ! W#4       R# )r   r   r	   r   r   r   N)r      r#   r#   r#   r#   r   r    s       r   ,test_groupby_sample_index_value_spans_groupsr$   (   s    S1WsQwF	Cf-5G	HBZZ_##a#(FS1WsQwF#vsF36<<HH&+ZZ_S!((1(-Ff3fll;H6,r   c                     \        R ^^.R^^./4      p Rp\        P                  ! \        VR7      ;_uu_ 4        V P	                  R 4      P                  ^RR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V P	                  R 4      R,          P                  ^RR7       RRR4       R#   + '       g   i     Lh; i  + '       g   i     R# ; i)r   r	   z0Please enter a value for `frac` OR `n`, not bothmatchg      ?r
   Nr   pytestraises
ValueErrorr   r   r   msgs     r   %test_groupby_sample_n_and_frac_raisesr.   6   s    	C!Qq!f-	.B
<C	z	-	-


3- 
. 
z	-	-


3##ac#2 
.	- 
.	- 
.	-	-   #B=	*C=C	C!	c                     \        R ^^.R^^./4      p Rp\        P                  ! \        VR7      ;_uu_ 4        V P	                  R 4      P                  RRR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V P	                  R 4      R,          P                  RRR7       RRR4       R#   + '       g   i     Lh; i  + '       g   i     R# ; i)r   r	   zJReplace has to be set to `True` when upsampling the population `frac` > 1.r&         ?Fr   replaceNr(   r,   s     r   :test_groupby_sample_frac_gt_one_without_replacement_raisesr4   A   s    	C!Qq!f-	.B
VC	z	-	-


3C7 
. 
z	-	-


3##e#< 
.	- 
.	- 
.	-	-r/   r   r1   c                    \        R ^^.R^^./4      pV ^ 8  d   RpMRp\        P                  ! \        VR7      ;_uu_ 4        VP	                  R 4      P                  V R7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP	                  R 4      R,          P                  V R7       RRR4       R#   + '       g   i     Lg; i  + '       g   i     R# ; i)r   r	   z=A negative number of rows requested. Please provide `n` >= 0.z$Only integers accepted as `n` valuesr&   r   Nr(   )r   r   r-   s   &  r   $test_groupby_sample_invalid_n_raisesr6   L   s    	C!Qq!f-	.B1uM4	z	-	-


3# 
. 
z	-	-


3##a#( 
.	- 
.	- 
.	-	-s   "C)CC	C)	c                     ^.^
,          ^.^
,          ,           p \        RV RV /4      pVP                  R4      P                  RRR7      p^.^,          ^.^,          ,           p \        RV RV /VP                  R7      p\        P
                  ! W#4       VP                  R4      R,          P                  RRR7      p\        V RVP                  R7      p\        P                  ! W#4       R# )	r   r   r	   g       @Tr2   r   r   Nr   r    s       r   test_groupby_sample_oversampler8   \   s    S2Xb F	Cf-	.BZZ_##d#;FS2Xb F#vsF36<<HH&+ZZ_S!((c4(@Ff3fll;H6,r   c                     ^.^
,          ^.^
,          ,           p \        RV RV /4      pVP                  R4      P                  RRR7      p\        R^^.R^^./VP                  R7      p\        P
                  ! W#4       VP                  R4      R,          P                  RRR7      p\        ^^.RVP                  R7      p\        P                  ! W#4       R# )r   r   r	   Nr
   r   r   r   r    s       r   %test_groupby_sample_without_n_or_fracr:   j   s    S2Xb F	Cf-	.BZZ_##d#6F#1vsQF36<<HH&+ZZ_S!((4d(;Fq!f3fll;H6,r   zindex, expected_indexc                    ^.^,          ^.^,          ,           p\        RVRV/\        V 4      R7      pVP                  R4      P                  ^R. ROR7      p\        RVRV/\        V4      R7      p\        P
                  ! WE4       VP                  R4      R,          P                  ^R. ROR7      p\        VR\        V4      R7      p\        P                  ! WE4       R# )	r   r   r	   r   T)r   r3   weightsr   N)r   r   r   r   )r   r   r   r   r   r   r   r   )r   expected_indexr   r   r   r   s   &&    r    test_groupby_sample_with_weightsr>   w   s     S1WsQwF	Cf-U5\	BBZZ_##a|#LF#vsF35;PQH&+ZZ_S!((1dL(QFf3eN.CDH6,r   c                     ^.^
,          ^.^
,          ,           p \        RV RV RV /4      pVP                  R4      RR.,          P                  RRR7      p\        R^^.R^^./VP                  R7      p\        P
                  ! W#4       R# )r   r   r	   cNr
   r   )r   r   r   r   r   r   r    s       r   #test_groupby_sample_with_selectionsrA      s    S2Xb F	Cfc6:	;BZZ_c3Z(//$T/BF#1vsQF36<<HH&+r   c                      \        R . R. /4      p V P                  R 4      pVP                  4       pT p\        P                  ! W#4       R# )r   r	   N)r   r   r   r   r   )r   
groupby_dfr   r   s       r   %test_groupby_sample_with_empty_inputsrD      sC    	CS"%	&BCJ FH&+r   )r#   N)Ng?)wxyz)rF   rF   rH   rH   )            )rJ   rJ   rL   rL   )r)   pandasr   r   r   pandas._testing_testingr   markparametrizer   r!   r$   r.   r4   r6   r8   r:   r>   rA   rD    r   r   <module>rT      s     
  Y$<=- >---3= r3i() ))-
- 01L,3OP-	-,,r   