Ë
    *V.j!!  ã                   ód   — d Z ddlZddlZddlmZmZ ddlmZmZm	Z	 ddl
mZmZ d„ Zd„ Zd„ Zd	„ Zy)
zð
Tests of the groupby API, including internal consistency and with other pandas objects.

Tests in this file should only check the existence, names, and arguments of groupby
methods. It should not test the results of any groupby operation.
é    N)Ú	DataFrameÚSeries)Úgroupby_other_methodsÚreduction_kernelsÚtransformation_kernels)ÚDataFrameGroupByÚSeriesGroupByc                 óœ   — | j                  d¬«      }t        |«      D �ch c]  }|j                  d«      rŒ|’Œ }}h d£}||k(  sJ ‚y c c}w )NÚsecond)ÚlevelÚ_>B   ÚAÚBÚCÚaggÚallÚanyÚcovÚewmÚmaxÚminÚnthÚsemÚstdÚsumÚvarÚcorrÚdiffÚheadÚhistÚlastÚmeanÚndimÚohlcÚpipeÚplotÚprodÚrankÚsizeÚskewÚtailÚtakeÚapplyÚbfillÚcountÚffillÚfirstÚshiftÚcummaxÚcumminÚcumsumÚdtypesÚfillnaÚfilterÚgroupsÚidxmaxÚidxminÚmedianÚngroupÚsampleÚboxplotÚcumprodÚindicesÚngroupsÚnuniqueÚrollingÚcorrwithÚcumcountÚdescribeÚquantileÚresampleÚ	aggregateÚ	expandingÚ	get_groupÚ	transformÚ
pct_changeÚvalue_counts)ÚgroupbyÚdirÚ
startswith)Ú multiindex_dataframe_random_dataÚgrpÚvÚresultsÚexpecteds        ú_C:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\pandas/tests/groupby/test_api.pyÚtest_tab_completionrY      sW   € Ø
*×
2Ñ
2¸Ð
2Ó
B€CÜ˜cœ(Ó<™(�Q¨!¯,©,°sÕ*;Šq˜(€GÐ<òC€HðH �hÒÐÑùòK =s
    A	·A	c                 óú  — | j                  | j                  d d …df   «      }t        |«      D �ch c]  }|j                  d«      rŒ|’Œ c}t	        | j
                  «      z
  }t	        |«      }|t        z  }|t        z  }|t        z  }t        t        z  rJ ‚t        t        z  rJ ‚t        t        z  rJ ‚|rd|› d�}t        |«      ‚t        t        z  t        z  }||k7  rd||z
  › d�}t        |«      ‚y c c}w )Nr   r   z?
There are uncategorized methods defined on the Grouper class:
aG  .

Was a new method recently added?

Every public method On Grouper must appear in exactly one the
following three lists defined in pandas.core.groupby.base:
- `reduction_kernels`
- `transformation_kernels`
- `groupby_other_methods`
see the comments in pandas/core/groupby/base.py for guidance on
how to fix this test.
        zI
Some methods which are supposed to be on the Grouper class
are missing:
z‡.

They're still defined in one of the lists that live in pandas/core/groupby/base.py.
If you removed a method, you should update them
)
rP   ÚilocrQ   rR   ÚsetÚcolumnsr   r   r   ÚAssertionError)rS   rT   r   ÚnamesÚ	new_namesÚmsgÚall_categorizeds          rX   Útest_all_methods_categorizedrc   e   s0  € Ø
*×
2Ñ
2Ø(×-Ñ-ªa°¨dÑ3ó€Cô ˜CœÓ:™�1¨¯©°SÕ(9ŠQ˜Ñ:¼SØ(×0Ñ0ó>ñ €Eô �E“
€IØÔ"Ñ"€IØÔ'Ñ'€IØÔ&Ñ&€Iä Ô#9Ò9Ð9Ð9Ü Ô#8Ò8Ð8Ð8Ü%Ô(=Ò=Ð=Ð=ñ ðà
€ð 	ðˆô ˜SÓ!Ð!ô (Ô*@Ñ@ÔCXÑX€OØ�Òðð �5ÑÐ ð ðˆô ˜SÓ!Ð!ð  ùòA ;s   °C8ÁC8c                 ó¸  — | dv rd}t        j                  |¬«       | dv rt        t        | «      rJ ‚y t	        t        | «      }t	        t
        | «      }t        t        j                  |«      j                  «      }| dk(  rdh}n(t        t        j                  |«      j                  «      }t        «       t        «       }}| dv rh d£}nl| d	v rd
dh}nc| dv rdh}n[| dv r	h d£}h d£}nN| dv r	h d£}ddh}nA| dv rh d£}n8| dv rh d£}n/| dv rddh}d
h}n#| dv rdh}n| dv rdh}dh}n| dv rd
h}n| dv rddh}||z  |k(  sJ ‚||z  |k(  sJ ‚||z  }||z  }||k(  sJ ‚y )N©r1   r!   z?first and last are entirely different between frame and groupby)Úreason)rF   r=   r)   Úself©r   r   >   ÚaxisÚkwargsÚ	bool_only)r/   Únumeric_onlyri   )rC   ©r   r   >   ri   rj   Úskipna>   ÚengineÚ	min_countÚengine_kwargs©r"   r   r   r   ro   rq   ©r<   r'   r   ©Úbackfillr.   r0   Úpad>   ri   ÚinplaceÚdowncastÚ
limit_area©r3   r4   rn   Úargs©r@   r5   ©rN   rj   ©r(   ©rH   Úmethod)
ÚpytestÚskipÚhasattrr   Úgetattrr   r\   ÚinspectÚ	signatureÚ
parameters)Úgroupby_funcra   Úframe_methodÚ	gb_methodÚresultrW   Úexclude_expectedÚexclude_results           rX   Útest_frame_consistencyrŽ   •   sÖ  € àÐ(Ñ(ØOˆÜ�‰˜3ÕàÐ-Ñ-Üœ9 lÔ3Ð3Ð3Øäœ9 lÓ3€LÜÔ(¨,Ó7€IÜ”×"Ñ" 9Ó-×8Ñ8Ó9€FØ�vÒà�8‰ä”w×(Ñ(¨Ó6×AÑAÓBˆô (+£u¬c«e�nÐØ�~Ñ%Ú:ÑØ	˜Ñ	#Ø*¨FÐ3ÑØ	˜Ñ	%Ø"˜8ÑØ	˜Ñ	'Ú7ÐÚA‰Ø	Ð6Ñ	6Ú7ÐØ" OÐ4‰Ø	Ð2Ñ	2Ú7ÑØ	Ð>Ñ	>ÚHÑØ	Ð-Ñ	-Ø$ fÐ-ÐØ(Ð)‰Ø	Ð.Ñ	.Ø$˜:ÑØ	˜Ñ	(Ø$˜:ÐØ ˜‰Ø	˜Ñ	"Ø*Ð+ÑØ	˜Ñ	&Ø$ fÐ-Ðð �NÑ" nÒ4Ð4Ð4ØÐ&Ñ&Ð*:Ò:Ð:Ð:à
ˆnÑ€FØÐ Ñ €HØ�XÒÐÑó    c                 ó°  — |dv rt        j                  d«       |dv rt        t        |«      rJ ‚y t	        t        |«      }t	        t
        |«      }t        t        j                  |«      j                  «      }|dk(  rdh}n(t        t        j                  |«      j                  «      }t        «       t        «       }}|dv rh d£}nk|dv rd	h}nc|d
v r	h d£}h d£}nV|dv r	h d£}ddh}nI|dv rh d£}n@|dv rh d£}n7|dv rddh}dh}n+|dv rdh}n#|dv rdh}d	h}n|dv rdh}n|dv rddh}n|dv rdh}||z  |k(  sJ ‚||z  |k(  sJ ‚||z  }||z  }||k(  sJ ‚y )Nre   z@first and last are entirely different between Series and groupby)rF   rE   r=   r)   rg   rh   >   ri   rj   rk   )r   ri   rm   >   ri   rj   rn   >   ro   rp   rq   rr   ro   rq   rs   rt   >   ri   rw   rx   ry   rz   rn   r{   rl   r|   r}   rj   r~   )r;   r:   r   )
r�   r‚   rƒ   r   r„   r	   r\   r…   r†   r‡   )Úrequestrˆ   Úseries_methodrŠ   r‹   rW   rŒ   r�   s           rX   Útest_series_consistencyr“   Ñ   sÎ  € àÐ(Ñ(Ü�‰ÐVÔWàÐ9Ñ9Üœ6 <Ô0Ð0Ð0ØäœF LÓ1€MÜœ |Ó4€IÜ”×"Ñ" 9Ó-×8Ñ8Ó9€FØ�vÒà�8‰ä”w×(Ñ(¨Ó7×BÑBÓCˆô (+£u¬c«e�nÐØ�~Ñ%Ú:ÑØ	˜Ñ	"Ø ˜‰Ø	˜Ñ	'Ú7ÐÚA‰Ø	Ð6Ñ	6Ú7ÐØ" OÐ4‰Ø	Ð2Ñ	2Ú7ÑØ	Ð>Ñ	>ÚHÑØ	Ð-Ñ	-Ø$ fÐ-ÐØ(Ð)‰Ø	Ð.Ñ	.Ø$˜:ÑØ	˜Ñ	(Ø$˜:ÐØ ˜‰Ø	˜Ñ	"Ø*Ð+ÑØ	Ð-Ñ	-Ø" HÐ-ÑØ	˜Ñ	&Ø(Ð)ˆð �NÑ" nÒ4Ð4Ð4ØÐ&Ñ&Ð*:Ò:Ð:Ð:à
ˆnÑ€FØÐ Ñ €HØ�XÒÐÑr�   )Ú__doc__r…   r�   Úpandasr   r   Úpandas.core.groupby.baser   r   r   Úpandas.core.groupby.genericr   r	   rY   rc   rŽ   r“   © r�   rX   Ú<module>r™      s>   ðñó ã ÷÷ñ ÷
òGòT-"ò`9óx8r�   