o
    Ti                     @   sB  d dl Zd dlZd dlmZ d dlmZ d dlm	Z	m
Z
 ejddgddd Zejddgdd	d
 Zejddgddd Zejddgddd Zejddgddd Zejdd Zejdd Zejdd Zejdd Zejdd Zejdd Zejdd Ze dd  Ze d!d" Zejee	dd#d$ Zejee
dd%d& Zejee	ee
 dd'd( Zejddgdd)d* Zejdgdd+d, Zejdgdd-d. Z ejd/i fd0d1d2ifd0d1d ifd3d1d2ifd3d1d ifd4i fd5i fd6i fd4d7d8ifd5d7d8ifd6d7d8ifgg d9d:d;d< Z!dS )=    N	DataFrame)reduction_kernelstransformation_kernelsTF)paramsc                 C      | j S Nparamrequest r   ]/var/www/html/evchargy.com/venv/lib/python3.10/site-packages/pandas/tests/groupby/conftest.pysort      r   c                 C   r   r   r	   r   r   r   r   as_index   r   r   c                 C   r   r   r	   r   r   r   r   dropna   r   r   c                 C   r   r   r	   r   r   r   r   skipna   r   r   c                 C   r   r   r	   r   r   r   r   observed    r   r   c                 C   s   | S r   r   )Z multiindex_dataframe_random_datar   r   r   mframe%   s   r   c                   C   s6   t g dg dtjddtjd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_normalr   r   r   r   df*   s   r)   c                   C      t  S r   )tmZmakeTimeSeriesr   r   r   r   ts6      r,   c                   C   r*   r   )r+   ZgetTimeSeriesDatar   r   r   r   tsd;   r-   r.   c                 C   s   t | S r   r   )r.   r   r   r   tsframe@   r-   r/   c                   C   s@   t g dg dtjddtjtjdddddS )Nr   r   r   r   Zfloat32)Zdtyper   )r   r%   r&   r'   r(   arrayr   r   r   r   df_mixed_floatsE   s   r1   c                	   C   sL   t g dg dg dtjddtjddtjd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   )dullr2   shinyr2   r2   r3   r3   r2   r3   r3   r3   r      )r    r!   r"   r#   EFr$   r   r   r   r   three_groupQ   s   r7   c               	   C   sN   g dg dg dg dg dg dg dg dg} t | g d	d
}|dS )N)r   aZa0_at_0)   bZb0_at_1)r   r8   Za1_at_2)   r:   Zb1_at_3)   cZc0_at_4)   r8   Za2_at_5)   r8   Za3_at_6)   r8   Za4_at_7)IndexGroupValue)columnsrA   )r   Z	set_index)datar)   r   r   r   slice_test_df   s   

rF   c                 C   s   | j dddS )NrB   F)r   )groupby)rF   r   r   r   slice_test_grouped   s   rH   c                 C   r   )zT
    yields the string names of all groupby reduction functions, one at a time.
    r	   r   r   r   r   reduction_func   s   rI   c                 C   r   )z@yields the string names of all groupby transformation functions.r	   r   r   r   r   transformation_func      rJ   c                 C   r   )z5yields both aggregation and transformation functions.r	   r   r   r   r   groupby_func   rK   rL   c                 C   r   )z'parallel keyword argument for numba.jitr	   r   r   r   r   parallel   rK   rM   c                 C   r   )z$nogil keyword argument for numba.jitr	   r   r   r   r   nogil   rK   rN   c                 C   r   )z'nopython keyword argument for numba.jitr	   r   r   r   r   nopython   rK   rO   meanvarZddofr9   ZstdsumminmaxZ	min_countr   )rP   Zvar_1Zvar_0Zstd_1Zstd_0rR   rS   rT   zsum-min_countzmin-min_countzmax-min_count)r   Zidsc                 C   r   )z(reductions supported with engine='numba'r	   r   r   r   r   numba_supported_reductions   s   rU   )"numpyr%   ZpytestZpandasr   Zpandas._testingZ_testingr+   Zpandas.core.groupby.baser   r   Zfixturer   r   r   r   r   r   r)   r,   r.   r/   r1   r7   rF   rH   sortedrI   rJ   rL   rM   rN   rO   rU   r   r   r   r   <module>   sz    











1





	








