1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Ë
oñúhÎ8ãóˆ—ddlZddlZddlmZddlmZddlZ    ddlm
Z
m Z ddl m ZddlmZmZGd„d«ZGd„d    «Zy)
éN)Úindex)Ú NDArrayBacked)Ú CategoricalÚCategoricalDtype)ÚCategoricalIndexÚIndexcór—eZdZejdefd„«Zd„Zd„Zd„Z    d„Z
ejjdgd¢gd    ¢ge d
«e d «gg«d „«Zd „Zejjdgd¢gd¢ej"gd¢«ej"gd¢«ej"gd¢«dœfgd¢e d
«ej"gd¢«ej"gd¢«ej"gd¢«dœfgd¢e d
«ej$dej&¬«ej$dej&¬«ej$dej&¬«dœfe d«e d
«ej"gd¢«ej"gd¢«ej"gd¢«dœfg«d„«Zejjdgd¢gd¢dgfgd¢e d
«ej*gfgd¢gd¢ddej*gfgd¢e d
«ej*dd gfg«d!„«Zd"„Zd#„Zd$„Zd%„Zd&„Zy')(ÚTestCategoricalIndexÚreturncóB—ttd«td«d¬«S)NÚaabbcaÚcabF©Ú
categoriesÚordered)rÚlist)Úselfs úaH:\Change_password\venv_build\Lib\site-packages\pandas/tests/indexes/categorical/test_category.pyÚ simple_indexz!TestCategoricalIndex.simple_indexs€ä¤ X£¼4À»;ÐPUÔVÐVócóf—ttd«dd¬«}|d}|j|«dusJ‚y)Nr FrrT)rrÚ$_can_hold_identifiers_and_holds_name)rÚidxÚkeys   rÚtest_can_hold_identifiersz.TestCategoricalIndex.test_can_hold_identifierss6€Üœt H›~¸$ÈÔNˆØ!‰fˆØ×7Ñ7¸Ó<ÀÑDÐDÑDrcóh—|}|j}|jdd«}ttd«|¬«}t    j
||d¬«|jdd«}ttd«|¬«}t    j
||d¬«tg|¬«jdd«}tdg|¬«}t    j
||d¬«|j t«jdd    «}|jdd    «j t«}t    j
||d¬«tdtjdd
d d
g«}tjtjdfD]<}ttd ««jd |«}t    j
||«Œ>y)NrÚaÚaaabbca©rT©ÚexactéÿÿÿÿÚaabbcaaÚdÚbÚcÚaabcbé) rÚinsertrrÚtmÚassert_index_equalÚastypeÚobjectÚnpÚnanÚpdÚNaT)rrÚcirÚresultÚexpectedÚnas       rÚ test_insertz TestCategoricalIndex.test_insertsc€Ø ˆØ—]‘]ˆ
𗑘1˜cÓ"ˆÜ#¤D¨£OÀ
ÔKˆÜ
×јf h°dÕ;𗑘2˜sÓ#ˆÜ#¤D¨£OÀ
ÔKˆÜ
×јf h°dÕ;ô" "°Ô<×CÑCÀAÀsÓKˆÜ# S E°jÔAˆÜ
×јf h°dÕ;ð—9‘9œVÓ$×+Ñ+¨A¨sÓ3ˆØ—‘˜1˜cÓ"×)Ñ)¬&Ó1ˆÜ
×јf h°dÕ;ô$ S¬"¯&©&°#°s¸CÀÐ$EÓFˆÜ—6‘6œ2Ÿ6™6 4Ð(ò    4ˆBÜ%¤d¨7£mÓ4×;Ñ;¸A¸rÓBˆFÜ × !Ñ ! &¨(Õ 3ñ    4rcóЗtgd¢«}|jdtj«}t    tjdddgt
¬«}t j||«y)N)rr(r(rr(©Údtype)rr)r0r1rr-r*r+©rr2r3r4s    rÚtest_insert_na_mismatched_dtypez4TestCategoricalIndex.test_insert_na_mismatched_dtype;sI€Ü šiÓ (ˆØ—‘˜1œbŸf™fÓ%ˆÜœ"Ÿ&™& ! Q¨Ð*´&Ô9ˆÜ
×јf hÕ/rcó¦—|}|j}|jd«}ttd«|¬«}t    j
||d¬«|jd«}ttd«|¬«}t    j
||d¬«t    j ttf«5|jd«ddd«y#1swYyxYw)    NrÚabbcarTr r"Úaabbcé
)    rÚdeleterrr*r+Úexternal_error_raisedÚ
IndexErrorÚ
ValueError)rrr2rr3r4s      rÚ test_deletez TestCategoricalIndex.test_deleteAs¡€Ø ˆØ—]‘]ˆ
à—‘˜1“ˆÜ#¤D¨£M¸jÔIˆÜ
×јf h°dÕ;à—‘˜2“ˆÜ#¤D¨£M¸jÔIˆÜ
×јf h°dÕ;ä × %Ñ %¤z´:Ð&>Ó ?ñ    à I‰IbŒM÷    ÷    ñ    ús Â,CÃCzdata, non_lexsorted_data©r(éé)é    rr(rFrGÚabcÚfabcdcóÚ—t|«}|jdusJ‚|jdusJ‚t|d¬«}|jdusJ‚|jdusJ‚t|t|«¬«}|jdusJ‚|jdusJ‚t|t|«d¬«}|jdusJ‚|jdusJ‚|d|d|dg}t|t|«¬«}|jdusJ‚|jdusJ‚|}t|dd|¬«}|jdusJ‚|jdusJ‚t|dd    |¬«}|jdusJ‚|jdusJ‚y)
NTF©rrrrrFr(rG)rÚis_monotonic_increasingÚis_monotonic_decreasingÚreversed)rÚdataÚnon_lexsorted_datar&Úreordered_datars      rÚtest_is_monotonicz&TestCategoricalIndex.test_is_monotonicQs©€ô
˜TÓ "ˆØ×(Ñ(¨DÑ0Ð0Ð0Ø×(Ñ(¨EÑ1Ð1Ð1ä ˜T¨4Ô 0ˆØ×(Ñ(¨DÑ0Ð0Ð0Ø×(Ñ(¨EÑ1Ð1Ð1ä ˜T¬h°t«nÔ =ˆØ×(Ñ(¨EÑ1Ð1Ð1Ø×(Ñ(¨DÑ0Ð0Ð0ä ˜T¬h°t«nÀdÔ KˆØ×(Ñ(¨EÑ1Ð1Ð1Ø×(Ñ(¨DÑ0Ð0Ð0ð˜q™' 4¨¡7¨D°©GÐ4ˆÜ ˜^¼À»Ô GˆØ×(Ñ(¨EÑ1Ð1Ð1Ø×(Ñ(¨EÑ1Ð1Ð1ð(ˆ
ä ˜Z¨¨˜^¸
Ô CˆØ×(Ñ(¨DÑ0Ð0Ð0Ø×(Ñ(¨EÑ1Ð1Ð1ä ˜Z¨¨!˜_¸Ô DˆØ×(Ñ(¨DÑ0Ð0Ð0Ø×(Ñ(¨EÑ1Ð1Ñ1rcó*—tgd¢d¬«}|jdusJ‚|jdusJ‚tddgdd    gd¬
«}|jdusJ‚|jdusJ‚tgd ¢gd ¢d¬
«}|jdusJ‚|jdusJ‚y) N)rrrÚfoo)ÚnameFTrr(rFrG©rrV)rr(rFrGrE)rÚ    is_uniqueÚhas_duplicates)rrs  rÚtest_has_duplicatesz(TestCategoricalIndex.test_has_duplicatesws¤€Üšy¨uÔ5ˆØ}‰} Ñ%Ð%Ð%Ø×!Ñ! TÑ)Ð)Ð)ä  1˜v°1°a°&¸uÔEˆØ}‰} Ñ%Ð%Ð%Ø×!Ñ! TÑ)Ð)Ð)äš|º    ÈÔNˆØ}‰} Ñ$Ð$Ð$Ø×!Ñ! UÑ*Ð*Ñ*rzdata, categories, expected)r(r(r()FTT)TTF)TTT)ÚfirstÚlastF)rFrr%rG)Úshaper9Úabb)FFT)FTFcóø—t||d¬«}|j«D]Y\}}tj|j    |¬«|«||}|j |¬«}tj ||«Œ[y)NrUrW)Úkeep)rÚitemsr*Úassert_numpy_array_equalÚ
duplicatedÚdrop_duplicatesr+)rrPrr4rr`Úer3s        rÚtest_drop_duplicatesz)TestCategoricalIndex.test_drop_duplicates„sv€ôT˜t°
ÀÔGˆØ—~‘~Ó'ò    -‰GˆD!Ü × 'Ñ '¨¯©¸D¨Ó(AÀ1Ô EؐQB‘ˆAØ×(Ñ(¨dÐ(Ó3ˆFÜ × !Ñ ! &¨!Õ ,ñ        -rzdata, categories, expected_datar()r(rFrrFrr%cóš—t||¬«}t||¬«}t||¬«}tj|j    «|«y)NrLr8)rrr*r+Úunique)rrPrÚ expected_datarr9rr4s        rÚ test_uniquez TestCategoricalIndex.test_uniqueµs>€ô! °WÔ=ˆä˜t¨5Ô1ˆÜ# M¸Ô?ˆÜ
×јcŸj™j›l¨HÕ5rcó2—tddgddgd¬«}t|«tjt    t |««|d¬«t|«tt jjd«jddd    ¬
««}t|«y) Nrr%Trr rFrééd)Úsize)
rÚstrr*r+ÚevalÚreprr.ÚrandomÚ default_rngÚintegers)rr2s  rÚtest_repr_roundtripz(TestCategoricalIndex.test_repr_roundtripÅsv€Ü ˜s C˜j°c¸3°ZÈÔ NˆÜ ˆBŒÜ
×Ñœd¤4¨£8›n¨b¸Õ=ô     ˆBŒôœbŸi™i×3Ñ3°AÓ6×?Ñ?ÀÀ1È3Ð?ÓOÓ PˆÜ ˆBrcóV—ttd«tjgzgd¢¬«}t    j
|j dg«tjgd¢««t    j
|j gd¢«tjdgdzdgz««t    j
|j dd    d
tjg«tjdgd z««|j |jtd «««}tjdgd z«}t    j
||«|j |jtd «««}tjdgdzdgz«}t    j
||«y)NÚaabca)r&rr%rr&)FFFTFFTrlFrr%éÚ    abcdefghiÚdefghi)    rrr.r/r*rbÚisinÚarrayÚset_categoriesr:s    rÚ    test_isinzTestCategoricalIndex.test_isinÒs>€Ü œd 7›m¬r¯v©v¨hÑ6Â?Ô SˆÜ
×#Ñ#Ø G‰GSE‹NœBŸH™HÒ%NÓOô    
ô     ×#Ñ#Ø G‰G’OÓ $¤b§h¡h°¨v¸©z¸U¸GÑ/CÓ&Dô    
ô     ×#Ñ#Ø G‰GS˜#˜s¤B§F¡FÐ+Ó ,¬b¯h©h¸°vÀ±zÓ.Bô    
ð
—‘˜×*Ñ*¬4° Ó+<Ó=Ó>ˆÜ—8‘8˜T˜F Q™JÓ'ˆÜ
×#Ñ# F¨HÔ5à—‘˜×*Ñ*¬4°«>Ó:Ó;ˆÜ—8‘8˜U˜G a™K¨4¨&Ñ0Ó1ˆÜ
×#Ñ# F¨HÕ5rcó—tjtjdd«tjdd«g«}t|«j    |«}t j ddg«}tj||«y)NrrFr(T)    r0Ú IntervalIndexÚIntervalrr{r.r|r*rb)rrr3r4s    rÚtest_isin_overlapping_intervalsz4TestCategoricalIndex.test_isin_overlapping_intervalsçsd€ä×Ѥ§ ¡ ¨A¨qÓ 1´2·;±;¸qÀ!Ó3DÐEÓFˆÜ! #Ó&×+Ñ+¨CÓ0ˆÜ—8‘8˜T 4˜LÓ)ˆÜ
×#Ñ# F¨HÕ5rcóڗtddgddgd¬«}tddggd¢d¬«}|j|«sJ‚|j|j««sJ‚|j|«rJ‚y)Nrr%Tr)rr%r&)rÚ    identicalÚcopy)rÚci1Úci2s   rÚtest_identicalz#TestCategoricalIndex.test_identicalîsi€Ü  S˜z°s¸C°jÈ$ÔOˆÜ  S˜z²oÈtÔTˆØ}‰}˜SÔ!Ð!Ð!؏}‰}˜SŸX™X›ZÔ(Ð(Ð(Ø—=‘= Ô%Ð%Ð%Ð%rcó–—ttd«dz«}t|jd¬«}tj||«t j |jj|jj«rJ‚t|jd¬«}|jj|jjusJ‚y)NÚabrlT)r…F)    rrÚvaluesr*r+r.Ú shares_memoryÚ_dataÚ_codes)rrr3s   rÚtest_ensure_copied_dataz,TestCategoricalIndex.test_ensure_copied_dataõs’€ô !¤ d£¨a¡Ó0ˆä! %§,¡,°TÔ:ˆÜ
×јe VÔ,Ü×#Ñ# F§L¡L×$7Ñ$7¸¿¹×9KÑ9KÔLÐLÐLä! %§,¡,°UÔ;ˆØ|‰|×"Ñ" e§k¡k×&8Ñ&8Ñ8Ð8Ñ8rN)Ú__name__Ú
__module__Ú __qualname__ÚpytestÚfixturerrrr6r;rDÚmarkÚ parametrizerrSrZr.r|ÚzerosÚbool_rfr/rjrur~r‚rˆr©rrr
r
sX„Ø ‡^^ðWÐ.òWóðWòEò
4ò<0ò ð  ‡[[×ÑØ"Ú
’_Р   %©¨U« ±T¸'³]Ð'CÐDóñ 2ó    ð 2òD +ð ‡[[×ÑØ$òÚà%˜RŸX™XÒ&9Ó:Ø$˜BŸH™HÒ%8Ó9Ø#˜2Ÿ8™8Ò$6Ó7ñð òِU“ à%˜RŸX™XÒ&9Ó:Ø$˜BŸH™HÒ%8Ó9Ø#˜2Ÿ8™8Ò$6Ó7ñð òِU“ à%˜RŸX™X¨Q°r·x±xÔ@Ø$˜BŸH™H¨A°b·h±hÔ?Ø#˜2Ÿ8™8¨1°R·X±XÔ>ñð ñU“ ِU“ à%˜RŸX™XÒ&:Ó;Ø$˜BŸH™HÒ%9Ó:Ø#˜2Ÿ8™8Ò$7Ó8ñð ð9%    
ó(ñR-óS(ðR-ð ‡[[×ÑØ)â š     A 3Ð 'Ú ™˜U›  b§f¡f XÐ .Ú š) a¨¨B¯F©F ^Ð 4Ú ™D ›K¨"¯&©&°#°sÐ);Ð <ð        
óñ6óð6ò ò6ò*6ò&ó 9rr
c
óŽ—eZdZd„Zej
j deje    jfeje    jfeje    jfeje    j fg«d„«Zej
j dd„dfd„dfd    „dfd
„dfd „d fd „dfg«d„«Zd„Zd„Zy)ÚTestCategoricalIndex2cóR—ttd«dz«}d}tjt|¬«5|j d«ddd«tjt|¬«5|j j d«ddd«|dd}|j d«}|j jj d«}tj||«|j }tj|j d«|«y#1swYŒËxYw#1swYŒ˜xYw)NrŠé2z;When changing to a larger dtype, its size must be a divisor©ÚmatchÚi8éüÿÿÿ)
rrr“ÚraisesrCÚviewrÚcodesr*rb)rr2ÚmsgÚresr4Úcats      rÚ test_view_i8z"TestCategoricalIndex2.test_view_i8s݀ä œd 4›j¨2™oÓ .ˆØKˆÜ ]‰]œ:¨SÔ 1ñ    Ø G‰GDŒM÷    ä ]‰]œ:¨SÔ 1ñ     Ø H‰HM‰M˜$Ô ÷     ðˆWˆàg‰gd‹mˆØ—8‘8—>‘>×&Ñ& tÓ,ˆÜ
×#Ñ# C¨Ô2àh‰hˆÜ
×#Ñ# C§H¡H¨T£N°HÕ=÷    ð    ú÷     ð     úsµDÁ*DÄDÄD&zdtype, engine_typecó—|tjk7rJtjdtjdtjdi|}t t |««}ndt t d««}|jjjd«}tj|j||j«tj|jj|«sJ‚t!|j"|«sJ‚y)Nr(é€i€Úint64)r.r«Úint8Úint16Úint32rÚranger‹Ú_ndarrayr,rÚ__init__rr9Ú
issubdtyper¤Ú
isinstanceÚ_engine)rr9Ú engine_typeÚ num_uniquesr2Úarrs      rÚtest_engine_typez&TestCategoricalIndex2.test_engine_types¸€ð ”B—H‘HÒ ôŸ7™7 A¤r§x¡x°´b·h±hÀÐFÀuÑMˆKÜ!¤%¨ Ó"4Ó5‰Bô"¤%¨£,Ó/ˆBØ—)‘)×$Ñ$×+Ñ+¨GÓ4ˆCÜ × "Ñ " 2§8¡8¨S°"·(±(Ô ;܏}‰}˜RŸX™XŸ^™^¨UÔ3Ð3Ð3ܘ"Ÿ*™* kÔ2Ð2Ñ2rz func,op_namecó —||z
S©Nr™©rs rú<lambda>zTestCategoricalIndex2.<lambda>3ó
€˜˜s™€rÚ__sub__có —||zSrºr™r»s rr¼zTestCategoricalIndex2.<lambda>4r½rÚ__add__có—|ddgz
S©Nrr%r™r»s rr¼zTestCategoricalIndex2.<lambda>5󀘠 S˜zÑ)€rcó—|ddgzSrÂr™r»s rr¼zTestCategoricalIndex2.<lambda>6rÃrcó—ddg|z
SrÂr™r»s rr¼zTestCategoricalIndex2.<lambda>7ó€˜#˜s˜ cÑ)€rÚ__rsub__có—ddg|zSrÂr™r»s rr¼zTestCategoricalIndex2.<lambda>8rÆrÚ__radd__cóڗttddg««}d}djd|›ddd|›g«}tjt
|¬    «5||«ddd«y#1swYyxYw)
Nrr%z-'(Categorical|list)' and '(Categorical|list)'ú|zcannot perform z' with this index type: CategoricalIndexzcan only concatenate listz)unsupported operand type\(s\) for [\+-]: rž)rrÚjoinr“r¢Ú    TypeError)rÚfuncÚop_namerÚ cat_or_listr¥s      rÚtest_disallow_addsub_opsz.TestCategoricalIndex2.test_disallow_addsub_ops0su€ô”K  c 
Ó+Ó,ˆØEˆ ؏h‰hà! ' Ð*QÐRØ+Ø<¸[¸MÐJð ó
ˆô]‰]œ9¨CÔ 0ñ    Ù ŒI÷    ÷    ñ    ús Á    A!Á!A*c    óæ—ttd«td«¬«}|jtd««}tj|ttd«td«¬««ttd«td«¬«}|j td««}tj|ttd«td«¬««|j d„«}tj|ttd«td    «¬««ttd«td«¬«}|j d
g«}tj|ttd«td «¬««ttd«td«¬«}|jd g«}tj|ttd «tjgzdgztd«¬««ttd«td«¬«}|j«}tj||«ttd«td«¬«}|j«}tj|ttd«td«d¬««d}tjt|¬«5|jtd«d¬«ddd«y#1swYyxYw)Nr ÚcabdefrrÚefgÚffggefcó"—|j«Srº)Úupper)Úxs rr¼z>TestCategoricalIndex2.test_method_delegation.<locals>.<lambda>Xs €°·±³    €rÚAABBCAÚCABr$Úcabdr&ÚaabbrrŠTrz(cannot use inplace with CategoricalIndexrž)Úinplace)rrr}r*r+Úrename_categoriesÚadd_categoriesÚremove_categoriesr.r/Ú as_unorderedÚ
as_orderedr“r¢rC)rr2r3r¥s    rÚtest_method_delegationz,TestCategoricalIndex2.test_method_delegationJs0€Ü œd 8›n¼¸h»Ô HˆØ×"Ñ"¤4¨£;Ó/ˆÜ
×ÑØ Ô$¤T¨(£^ÄÀUà ÔLô    
ôœd 8›n¼¸e»Ô EˆØ×%Ñ%¤d¨5£kÓ2ˆÜ
×ÑØ Ô$¤T¨(£^ÄÀUà ÔLô    
ð
×%Ñ%Ñ&9Ó:ˆÜ
×ÑØ Ô$¤T¨(£^ÄÀUà ÔLô    
ôœd 8›n¼¸e»Ô EˆØ×"Ñ" C 5Ó)ˆÜ
×ÑØ Ô$¤T¨(£^ÄÀVà ÔMô    
ôœd 8›n¼¸e»Ô EˆØ×%Ñ% s eÓ,ˆÜ
×ÑØ Ü œT &›\¬R¯V©V¨HÑ4¸°uÑ<ÌÈdËÔ Tô    
ô
œd 8›n¼¸h»Ô HˆØ—‘Ó"ˆÜ
×јf bÔ)ä œd 8›n¼¸h»Ô HˆØ—‘“ˆÜ
×ÑØ Ü œT (›^¼¸X»ÐPTÔ Uô    
ð 9ˆÜ ]‰]œ:¨SÔ 1ñ    9Ø × Ñ œd 5›k°4Ð Ô 8÷    9÷    9ñ    9ús ËK'Ë'K0c óv—ttd«td«¬«}|jgd¢d¬«}tj|ttd«td«d¬««|j d    g«}tj|td
d t jd d d
gtd «d¬««y)NÚabcddaÚabcdr)r$r&r%rTrLÚdcbarr&rr%r$Údba)rrÚreorder_categoriesr*r+ràr.r/)rr2r3s   rÚtest_remove_maintains_orderz1TestCategoricalIndex2.test_remove_maintains_orderzs›€Ü œd 8›n¼¸f»Ô FˆØ×&Ñ&Ò';ÀTÐ&ÓJˆÜ
×ÑØ Ü œT (›^¼¸V» ÈdÔ Sô    
ð×)Ñ)¨3¨%Ó0ˆÜ
×ÑØ Ü Øcœ2Ÿ6™6 3¨¨SÐ1¼dÀ5»kÐSWô õ    
rN)rr‘r’r¨r“r•r–r.r¬ÚlibindexÚ
Int8Enginer­Ú Int16Enginer®Ú Int32Enginer«Ú Int64Enginer¸rÑrãrêr™rrr›r›sà„ò>ð$ ‡[[×ÑØà W‰Wh×)Ñ)Ð *Ø X‰Xx×+Ñ+Ð ,Ø X‰Xx×+Ñ+Ð ,Ø X‰Xx×+Ñ+Ð ,ð        
óñ 3óð 3ð ‡[[×ÑØá " IÐ .Ù " IÐ .Ù )¨9Ð 5Ù )¨9Ð 5Ù )¨:Ð 6Ù )¨:Ð 6ð     
ó
ñ ó
ð ò.9ó` 
rr›)Únumpyr.r“Ú pandas._libsrrëÚpandas._libs.arraysrÚpandasr0rrÚpandas._testingÚ_testingr*Úpandas.core.indexes.apirrr
r›r™rrú<module>r÷s<ðÛÛ å*Ý-ã÷õ÷÷ o9ño9÷dB
òB
r