gL iddlZddlZddlmZmZmZmZddlm Z m Z ejddgdZ ejddgdZ ejddgd Zejddgd Zejd Zejd Zejd ZejdZejdZejdZejee dZejee dZejee ee zdZejddgdZejdgdZejdgdZejdifdddifdddifdddifdddifdifdifdifddd ifddd ifddd ifg gd!"d#Zy)$N) DataFrameIndexSeries date_range)reduction_kernelstransformation_kernelsTF)paramsc|jSNparamrequests c/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/tests/groupby/conftest.pysortr ==c|jSr r rs ras_indexrrrc|jSr r rs rdropnarrrc|jSr r rs robservedrrrctgdgdtjjdj dtjjdj ddS)N)foobarrrrrrr)onertwothreerrrr)ABCDrnprandom default_rngstandard_normalrrdfr,$sT IM&&q)99!<&&q)99!<   rcttjjdj dt dddS)Nr  2000-01-01r#periodsfreq)index)rr'r(r)r*rr+rrtsr40s8  a 004r< rc ttjjdj dt t dttddd S) Nr )r.ABCD)dtyper/r.r#r0)columnsr3) rr'r(r)r*rlistobjectrr+rrtsframer<8sF  a 009d6l&1r< rc :tgdgdgdtjjdj dtjjdj dtjjdj ddS)N) rrrrrrrrrrr) rrrrrrrrrrr) dullr>shinyr>r>r?r?r>r?r?r?r )r"r#r$r%EFr&r+rr three_grouprCAs}    &&q)99"=&&q)99"=&&q)99"=U+ - -rc vgdgdgdgdgdgdgdgdg}t|gd  }|jd S) N)raa0_at_0)bb0_at_1)r rEa1_at_2)rHb1_at_3)r6cc0_at_4)rEa2_at_5)rEa3_at_6)rEa4_at_7)rGroupValue)r9r)r set_index)datar,s r slice_test_dfrYssA  D 4!< =B <<  rc(|jddS)NrUF)r)groupby)rYs rslice_test_groupedr\s  5 99rc|jS)zT yields the string names of all groupby reduction functions, one at a time. r rs rreduction_funcr^s ==rc|jS)z@yields the string names of all groupby transformation functions.r rs rtransformation_funcr` ==rc|jS)z5yields both aggregation and transformation functions.r rs r groupby_funcrcrarc|jS)z'parallel keyword argument for numba.jitr rs rparallelrerarc|jS)z$nogil keyword argument for numba.jitr rs rnogilrgrarc|jS)z'nopython keyword argument for numba.jitr rs rnopythonrirarmeanvarddofrGstdsumminmax min_countr ) rjvar_1var_0std_1std_0rnrorpz sum-min_countz min-min_countz max-min_count)r idsc|jS)z(reductions supported with engine='numba'r rs rnumba_supported_reductionsrxs< ==r)numpyr'pytestpandasrrrrpandas.core.groupby.baserrfixturerrrrr,r4r<rCrYr\sortedr^r`rcrergrirxr+rrrs   e}%&e}%&e}%&e}%&..b ! !::v/012v4567 v/06:P3QQRS e}%&w  v              a ! a ! a !  898r