zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
U
­ý°d‹ã@s:ddlZddlmZmZmZddlmZGdd„dƒZ    dS)éN)Ú    DataFrameÚ
MultiIndexÚSeriesc@s$eZdZdd„Zdd„Zdd„ZdS)ÚTestDataFramePopcCsÞd|j_| d¡d|kst‚d|d<| d¡d|ks<t‚|jjdksLt‚tdddgdd    d
ggdd d gd dgd}| d ¡}|d7}tddgdd
ggdd gd dgd}t ||¡tdd    gd dgd dd}t ||¡dS)NZbazÚAÚbarZfooééééééÚBÚCÚXÚY)ÚcolumnsÚindex)rÚname)    rrÚpopÚAssertionErrorrÚtmÚassert_frame_equalrÚassert_series_equal)ÚselfZ float_frameÚaÚbÚexpected©rúZd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/frame/methods/test_pop.pyÚtest_pop s
 
 (
" zTestDataFramePop.test_popcCs–tddgddgddgdœƒ}dddg|_| d¡}t|ƒtksBt‚t|ƒdksRt‚t|jƒdksdt‚d|jksrt‚d|jks€t‚t|jƒdks’t‚dS)    Nrrr r )rrr    rrr    )rrrÚtyperÚlenr)rÚdfÚresrrrÚtest_pop_non_unique_cols$s 
z)TestDataFramePop.test_pop_non_unique_colsc    Csæddddddgddddddgdd    d
dddgg}tt|Žƒ}t |¡}ttj d d ¡|d }| ¡}| ¡}|     d¡}|     d¡}t
j ||ddt
  ||¡|j dks¨t‚|d}|jdgdd}|     d¡}t
  ||¡t
  ||¡dS)NrÚtopZroutine1Zroutine2ÚZODZresult1Zresult2ZwxZwyr r )r)rr'r'F)Z check_namesr)Zaxis)ÚsortedÚziprÚ from_tuplesrÚnpÚrandomZrandnÚcopyrrrrrrZdrop)    rZarraysZtuplesrr#Zdf1Zdf2ÚresultrrrrÚtest_mixed_depth_pop0s&ý 
 
 
 
 z%TestDataFramePop.test_mixed_depth_popN)Ú__name__Ú
__module__Ú __qualname__r r%r/rrrrr s r)
Únumpyr+ZpandasrrrZpandas._testingZ_testingrrrrrrÚ<module>s