
    Owg                         d dl Zd dlZd dlmZmZmZmZ d dlm	Z	m
Z
  ej                  ddg      d        Z ej                  ddg      d        Z ej                  ddg      d	        Z ej                  ddg      d
        Zej                  d        Zej                  d        Zej                  d        Zej                  d        Z ej                         d        Z ej                         d        Z ej                   ee	            d        Z ej                   ee
            d        Z ej                   ee	       ee
      z         d        Z ej                  ddg      d        Z ej                  dg      d        Z ej                  dg      d        Z ej                  di fdddifddd ifdddifddd ifdi fdi fdi fddd ifddd ifddd ifgg d!"      d#        Zy)$    N)	DataFrameIndexSeries
date_range)reduction_kernelstransformation_kernelsTF)paramsc                     | j                   S Nparamrequests    T/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/groupby/conftest.pysortr          ==    c                     | j                   S r   r   r   s    r   as_indexr      r   r   c                     | j                   S r   r   r   s    r   dropnar      r   r   c                     | j                   S r   r   r   s    r   observedr      r   r   c                      t        g dg dt        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      d      S )N)foobarr   r   r   r   r   r   )oner   twothreer   r   r   r         )ABCDr   nprandomdefault_rngstandard_normal r   r   dfr,   $   sT    IM&&q)99!<&&q)99!<		
 r   c                      t        t        j                  j                  d      j	                  d      t        ddd            S )Nr       
2000-01-01r#   periodsfreq)index)r   r'   r(   r)   r*   r   r+   r   r   tsr4   0   s8    
		a 004r< r   c            	          t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      S )
Nr    )r.      ABCD)dtyper/   r.   r#   r0   )columnsr3   )	r   r'   r(   r)   r*   r   listobjectr   r+   r   r   tsframer<   8   sF    
		a 009d6l&1r< r   c            
      :   t        g dg dg dt        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      d      S )N)r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   )dullr>   shinyr>   r>   r?   r?   r>   r?   r?   r?   r       )r"   r#   r$   r%   EFr&   r+   r   r   three_grouprC   A   s}     &&q)99"=&&q)99"=&&q)99"=U+	
- -r   c            	      v    g dg dg dg dg dg dg dg dg} t        | g d	
      }|j                  d      S )N)r   aa0_at_0)   bb0_at_1)r    rE   a1_at_2)   rH   b1_at_3)r6   cc0_at_4)   rE   a2_at_5)   rE   a3_at_6)   rE   a4_at_7)r   GroupValue)r9   r   )r   	set_index)datar,   s     r   slice_test_dfrY   s   sA     		D 
4!<	=B<<  r   c                 (    | j                  dd      S )NrU   F)r   )groupby)rY   s    r   slice_test_groupedr\      s      5 99r   c                     | j                   S )zT
    yields the string names of all groupby reduction functions, one at a time.
    r   r   s    r   reduction_funcr^      s    
 ==r   c                     | j                   S )z@yields the string names of all groupby transformation functions.r   r   s    r   transformation_funcr`           ==r   c                     | j                   S )z5yields both aggregation and transformation functions.r   r   s    r   groupby_funcrc      ra   r   c                     | j                   S )z'parallel keyword argument for numba.jitr   r   s    r   parallelre      ra   r   c                     | j                   S )z$nogil keyword argument for numba.jitr   r   s    r   nogilrg      ra   r   c                     | j                   S )z'nopython keyword argument for numba.jitr   r   s    r   nopythonri      ra   r   meanvarddofrG   stdsumminmax	min_countr    )rj   var_1var_0std_1std_0rn   ro   rp   zsum-min_countzmin-min_countzmax-min_count)r	   idsc                     | j                   S )z(reductions supported with engine='numba'r   r   s    r   numba_supported_reductionsrx      s    < ==r   )numpyr'   pytestpandasr   r   r   r   pandas.core.groupby.baser   r   fixturer   r   r   r   r,   r4   r<   rC   rY   r\   sortedr^   r`   rc   re   rg   ri   rx   r+   r   r   <module>r      s      e}% & e}% & e}% & e}% &       . .b ! ! : : v/01 2 v456 7
 v/06:P3QQR S
 e}% & w  
 v 
 									a !	a !	a !	898r   