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
Ë
oñúhÅ;ãó\—ddlZddlZddlmZddlZddlmZmZm    Z    ddl
m Z Gd„d«Z y)éN)Úunion_categoricals)Ú CategoricalÚCategoricalIndexÚSeriescón—eZdZejj ded«ed«ed«fgd¢gd¢gd¢fgd¢gd    ¢gd
¢fd d ejd gd ejd gd d ejd d ejd gfe    jdd«e    jdd«e    jdd«fe    jddd¬«e    jddd¬«e    jddd¬«fe    jdd«e    jdd«e    jdd«fg«ejj de e eg«d„««Zd„Zd„Zd„Zd„Zd„Zejj dgdgg«d„«Zd„Zd„Zd „Zd!„Zd"„Zd#„Zd$„Zd%„Zd&„Zd'„Zd(„Z d)„Z!d*„Z"d+„Z#y,)-ÚTestUnionCategoricalsza, b, combinedÚabcÚabdÚabcabd)réé©r éé)rr r r rr©rç333333ó?r )r ç333333 @r)rrr r rrÚbÚaÚcz
2014-01-01z
2014-01-05z
2014-01-06z
2014-01-07z
US/Central)ÚtzÚboxcóœ—t|t|««|t|««g«}t|«}tj||«y)N)rrÚtmÚassert_categorical_equal)ÚselfrrÚcombinedrÚresultÚexpecteds       ú_H:\Change_password\venv_build\Lib\site-packages\pandas/tests/reshape/test_union_categoricals.pyÚtest_union_categoricalz,TestUnionCategoricals.test_union_categoricals?€ô>$¡S¬°Q«Ó%8¹#¼kÈ!»nÓ:MÐ$NÓOˆÜ˜xÓ(ˆÜ
×#Ñ# F¨HÕ5ócó —tgd¢«}tgd¢«}t||g«}tgd¢gd¢¬«}tj||«y)N©ÚxÚyÚz©rrr©r%r&r'rrr©Ú
categories©rrrr©rÚsÚs2rrs     r Ú)test_union_categorical_ordered_appearancez?TestUnionCategoricals.test_union_categorical_ordered_appearance3sF€ä šÓ (ˆÜ šÓ )ˆÜ# Q¨ GÓ,ˆÜÚ *Ò7Uô
ˆô     ×#Ñ# F¨HÕ5r"có¤—tgd¢d¬«}tgd¢d¬«}t||g«}tgd¢d¬«}tj||«y)NrT©Úordered)rrr rrr r,r-s     r Ú#test_union_categorical_ordered_truez9TestUnionCategoricals.test_union_categorical_ordered_true=sE€Ü š ¨TÔ 2ˆÜ š¨dÔ 3ˆÜ# Q¨ GÓ,ˆÜÒ5¸tÔDˆÜ
×#Ñ# F¨HÕ5r"có¶—tgd¢«}tgd¢«}d}tjt|¬«5t    ||g«ddd«y#1swYyxYw)Nrrz$dtype of categories must be the same©Úmatch)rÚpytestÚraisesÚ    TypeErrorr)rr.r/Úmsgs    r Ú"test_union_categorical_match_typesz8TestUnionCategoricals.test_union_categorical_match_typesDsJ€ä š Ó $ˆÜ šÓ #ˆØ4ˆÜ ]‰]œ9¨CÔ 0ñ    (Ü   2˜wÔ '÷    (÷    (ñ    (ús ¸AÁAcó~—d}tjt|¬«5tg«ddd«y#1swYyxYw)NzNo Categoricals to unionr6)r8r9Ú
ValueErrorr)rr;s  r Útest_union_categorical_emptyz2TestUnionCategoricals.test_union_categorical_emptyLs2€Ø(ˆÜ ]‰]œ:¨SÔ 1ñ    #Ü ˜rÔ "÷    #÷    #ñ    #úsž 3³<c
ó”—ttddtjg«tddtjg«g«}tddtjddtjg«}t    j
||«ttddg«tddtjg«g«}tddddtjg«}t    j
||«t jd«t jd«t jg}t jt jd«t jd«g}tt|«t|«g«}t||zt jd«t jd«t jd«g¬    «}t    j
||«tttjtjtjgt¬
««td gt jd gt¬
«¬    «g«}ttjtjd g«}t    j
||«tttjtjg«ttjtjg«g«}ttjtjtjtjg«}t    j
||«y) Nr r rÚAÚBz
2011-01-01z
2011-03-01z
2011-02-01r*©ÚdtypeÚX) rrÚnpÚnanrrÚpdÚ    TimestampÚNaTÚarrayÚobjectÚIndex)rÚresÚexpÚval1Úval2s     r Útest_union_categoricals_nanz1TestUnionCategoricals.test_union_categoricals_nanQsB€ä Ü ˜!˜Q¤§¡˜Ó (¬+°q¸!¼R¿V¹V°nÓ*EÐ Fó
ˆô˜1˜a¤§¡¨¨A¬r¯v©vÐ6Ó7ˆÜ
×#Ñ# C¨Ô-ä Ü ˜#˜s˜Ó $¤k°3¸¼R¿V¹VÐ2DÓ&EÐ Fó
ˆô˜3  S¨#¬r¯v©vÐ6Ó7ˆÜ
×#Ñ# C¨Ô-ä— ‘ ˜\Ó*¬B¯L©L¸Ó,FÌÏÉÐOˆÜ—‘œŸ ™  \Ó2´B·L±LÀÓ4NÐOˆä ¤+¨dÓ"3´[ÀÓ5FÐ!GÓHˆÜØ 4‰Kä— ‘ ˜\Ó*Ü— ‘ ˜\Ó*Ü— ‘ ˜\Ó*ðô
ˆô     ×#Ñ# C¨Ô-ô!äœBŸH™H¤b§f¡f¬b¯f©fÐ%5¼VÔDÓEܘS˜E¬b¯h©h¸°uÄFÔ.KÔLð ó
ˆô œ2Ÿ6™6¤2§6¡6¨3Ð/Ó0ˆÜ
×#Ñ# C¨Ô-ä Ü œ"Ÿ&™&¤"§&¡&Ð)Ó *¬K¼¿¹ÄÇÁÐ8HÓ,IÐ Jó
ˆôœ2Ÿ6™6¤2§6¡6¬2¯6©6´2·6±6Ð:Ó;ˆÜ
×#Ñ# C¨Õ-r"ÚvalÚ1cóò—|r5|dgk(r/|jtjjd¬««t    t g«t |«g«}t |«}t j||«y)NrTz0TDOD(infer_string) object and strings dont match)Úreason)Ú applymarkerr8ÚmarkÚxfailrrrr)rrSÚrequestÚusing_infer_stringrNrOs      r Útest_union_categoricals_emptyz3TestUnionCategoricals.test_union_categoricals_empty}sk€ñ  #¨#¨¢,Ø × Ñ Ü— ‘ ×!Ñ!ØMð"óô ô
!¤+¨b£/´;¸sÓ3CÐ!DÓEˆÜ˜#ÓˆÜ
×#Ñ# C¨Õ-r"c
óø—tgd¢gd¢¬«}tdddtjggd¢¬«}t||g«}tdddddddtjggd¢¬«}t    j
||«y)N)r r rrr*rr r r©rrFrGrrr©rÚc1Úc2rNrOs     r Ú$test_union_categorical_same_categoryz:TestUnionCategoricals.test_union_categorical_same_categoryŠsf€ä š²,Ô ?ˆÜ ˜!˜Q ¤2§6¡6Ð*²|Ô DˆÜ  " b Ó*ˆÜ˜1˜a  A q¨!¨Q´·±Ð7ÂLÔQˆÜ
×#Ñ# C¨Õ-r"có°—tgd¢gd¢¬«}tgd¢gd¢¬«}t||g«}tgd¢gd¢¬«}tj||«y)N)r'r'r'r$r*)r%r%r%)r'r'r'r%r%r%r,r_s     r Ú(test_union_categorical_same_category_strz>TestUnionCategoricals.test_union_categorical_same_category_str’sE€Ü š²_Ô EˆÜ š²_Ô EˆÜ  " b Ó*ˆÜÒ8Â_ÔUˆÜ
×#Ñ# C¨Õ-r"có°—tgd¢gd¢¬«}tgd¢gd¢¬«}t||g«}tgd¢gd¢¬«}tj||«y)Nr(r*©rrr)rrrrrrr,©rr`rarrs     r Ú6test_union_categorical_same_categories_different_orderzLTestUnionCategoricals.test_union_categorical_same_categories_different_order™sI€ä š²_Ô EˆÜ š²_Ô EˆÜ# R¨ HÓ-ˆÜÚ *²ô
ˆô     ×#Ñ# F¨HÕ5r"cóΗtgd¢d¬«}tgd¢d¬«}d}tjt|¬«5t    ||g«ddd«t    ||g«}tgd¢d¬«}t j ||«tdd    d
tjgd¬«}td
d    ggd¢d¬ «}t    ||g«}tdd    d
tjd
d    gd¬«}t j ||«tgd¢d¬«}tgd¢gd ¢d¬ «}d }tjt|¬«5t    ||g«ddd«y#1swYŒxYw#1swYyxYw)N©r r rTr2Fú$Categorical.ordered must be the samer6©r r rr r rr r r©r+r3©rr r ú>to union ordered Categoricals, all categories must be the same)    rr8r9r:rrrrFrG)rr`rar;rNrOs      r Útest_union_categoricals_orderedz5TestUnionCategoricals.test_union_categoricals_ordered£s4€Ü š¨DÔ 1ˆÜ š¨EÔ 2ˆà4ˆÜ ]‰]œ9¨CÔ 0ñ    )Ü   B˜xÔ (÷    )ô! " b Ó*ˆÜÒ,°dÔ;ˆÜ
×#Ñ# C¨Ô-ä ˜!˜Q ¤2§6¡6Ð*°DÔ 9ˆÜ ˜!˜Q˜ªI¸tÔ Dˆä  " b Ó*ˆÜ˜1˜a ¤B§F¡F¨A¨qÐ1¸4Ô@ˆÜ
×#Ñ# C¨Ô-ä š¨DÔ 1ˆÜ šªyÀ$Ô GˆàNˆÜ ]‰]œ9¨CÔ 0ñ    )Ü   B˜xÔ (÷    )ð    )÷%    )ñ    )ú÷$    )ð    )ús¼EÄ7EÅEÅE$có”—tgd¢d¬«}tgd¢d¬«}t||gd¬«}tgd¢«}tj||«d}t    j
t |¬«5t||gd¬«ddd«t||gd¬«}tgd¢«}tj||«t||gd¬«}tgd¢gd¢d¬    «}tj||«td
d d tjgd¬«}td d ggd¢d¬    «}t||gd¬«}td
d d tjd d g«}tj||«tgd¢d¬«}tgd¢gd ¢d¬    «}t||gd¬«}tgd¢«}tj||«t||gdd¬«}tgd¢gd¢¬«}tj||«tgd¢d¬«}tgd¢d¬«}t||gd¬«}tgd¢«}tj||«d}t    j
t |¬«5t||gd¬«ddd«t    j
t |¬«5t||g«ddd«y#1swYŒ)xYw#1swYŒHxYw#1swYyxYw)NrjTr2F)Ú ignore_orderrlrkr6rmr r rrn)rrÚsort_categoriesr*)réé)r r rrrtruro)    rrrrr8r9r:rFrG)rr`rarNrOr;rrs        r Ú$test_union_categoricals_ignore_orderz:TestUnionCategoricals.test_union_categoricals_ignore_order½sb€ä š¨DÔ 1ˆÜ š¨EÔ 2ˆä  " b ¸Ô=ˆÜÒ,Ó-ˆÜ
×#Ñ# C¨Ô-à4ˆÜ ]‰]œ9¨CÔ 0ñ    =Ü   B˜x°eÕ <÷    =ô! " b ¸Ô=ˆÜÒ,Ó-ˆÜ
×#Ñ# C¨Ô-ä  " b ¸Ô>ˆÜÒ,ºÈDÔQˆÜ
×#Ñ# C¨Ô-ä ˜!˜Q ¤2§6¡6Ð*°DÔ 9ˆÜ ˜!˜Q˜ªI¸tÔ Dˆä  " b ¸Ô=ˆÜ˜1˜a ¤B§F¡F¨A¨qÐ1Ó2ˆÜ
×#Ñ# C¨Ô-ä š¨DÔ 1ˆÜ šªyÀ$Ô Gˆä  " b ¸Ô=ˆÜÒ,Ó-ˆÜ
×#Ñ# C¨Ô-ä  " b ¸ÈdÔSˆÜÒ,ºÔCˆÜ
×#Ñ# C¨Ô-ä š¨DÔ 1ˆÜ š¨DÔ 1ˆÜ# R¨ H¸4Ô@ˆÜÒ1Ó2ˆÜ
×#Ñ# F¨HÔ5àNˆÜ ]‰]œ9¨CÔ 0ñ    =Ü   B˜x°eÕ <÷    =ô]‰]œ9¨CÔ 0ñ    )Ü   B˜xÔ (÷    )ð    )÷O    =ñ    =ú÷H    =ð    =ú÷    )ð    )ús$Á.J%ÉJ2ÊJ>Ê%J/Ê2J;Ê>Kcó"—tgd¢«}tgd¢«}t||gd¬«}tgd¢gd¢¬«}tj||«tdd    ggd
¢¬«}td    d ggd
¢¬«}t||gd¬«}tgd ¢gd¢¬«}tj||«tdd    ggd ¢¬«}td    d ggd ¢¬«}t||gd¬«}tgd ¢gd¢¬«}tj||«tdd    ggd¢¬«}td    d ggd¢¬«}t||gd¬«}tgd ¢gd¢¬«}tj||«tdtj
g«}ttj
d    g«}t||gd¬«}tdtj
tj
d    gd    dg¬«}tj||«ttj
g«}ttj
g«}t||gd¬«}ttj
tj
g«}tj||«tg«}tg«}t||gd¬«}tg«}tj||«td    dggd
¢d¬«}tdd ggd
¢d¬«}d}t jt|¬«5t||gd¬«ddd«y#1swYyxYw)Nr$r(T©rsr))rrrr%r&r'r*rrrfr©rrrr)rrrr%rmz9Cannot use sort_categories=True with ordered Categoricalsr6)    rrrrrFrGr8r9r:©rr`rarrr;s      r Útest_union_categoricals_sortz2TestUnionCategoricals.test_union_categoricals_sortñs„€ä šÓ )ˆÜ šÓ )ˆÜ# R¨ H¸dÔCˆÜÚ *Ò7Uô
ˆô     ×#Ñ# F¨HÔ5ô˜#˜s˜²Ô @ˆÜ ˜#˜s˜²Ô @ˆÜ# R¨ H¸dÔCˆÜÒ3ÂÔPˆÜ
×#Ñ# F¨HÔ5ä ˜#˜s˜²Ô @ˆÜ ˜#˜s˜²Ô @ˆÜ# R¨ H¸dÔCˆÜÒ3ÂÔPˆÜ
×#Ñ# F¨HÔ5ô˜#˜s˜²Ô @ˆÜ ˜#˜s˜²Ô @ˆÜ# R¨ H¸dÔCˆÜÒ3ÂÔPˆÜ
×#Ñ# F¨HÔ5ä ˜#œrŸv™v˜Ó 'ˆÜ œ"Ÿ&™& #˜Ó 'ˆÜ# R¨ H¸dÔCˆÜ ¤R§V¡V¬R¯V©V°SÐ9ÀsÈCÀjÔQˆÜ
×#Ñ# F¨HÔ5ä œ"Ÿ&™&˜Ó "ˆÜ œ"Ÿ&™&˜Ó "ˆÜ# R¨ H¸dÔCˆÜ¤§¡¬¯©Ð/Ó0ˆÜ
×#Ñ# F¨HÔ5ä ˜‹_ˆÜ ˜‹_ˆÜ# R¨ H¸dÔCˆÜ˜r“?ˆÜ
×#Ñ# F¨HÔ5ä ˜#˜s˜²ÈÔ NˆÜ ˜#˜s˜²ÈÔ NˆØIˆÜ ]‰]œ9¨CÔ 0ñ    ?Ü   B˜x¸Õ >÷    ?÷    ?ñ    ?ús Ë,LÌLcó¤—tgd¢«}tgd¢«}t||gd¬«}tgd¢gd¢¬«}tj||«y)Nr$r(Frxr)r*r,rgs     r Ú"test_union_categoricals_sort_falsez8TestUnionCategoricals.test_union_categoricals_sort_false'sH€ä šÓ )ˆÜ šÓ )ˆÜ# R¨ H¸eÔDˆÜÚ *Ò7Uô
ˆô     ×#Ñ# F¨HÕ5r"có´—tddggd¢¬«}tddggd¢¬«}t||gd¬«}tgd¢gd¢¬«}tj||«y)    Nrrrfr*rFrxryr,rgs     r Ú+test_union_categoricals_sort_false_fastpathzATestUnionCategoricals.test_union_categoricals_sort_false_fastpath1óO€ä ˜#˜s˜²Ô @ˆÜ ˜#˜s˜²Ô @ˆÜ# R¨ H¸eÔDˆÜÒ3ÂÔPˆÜ
×#Ñ# F¨HÕ5r"có´—tddggd¢¬«}tddggd¢¬«}t||gd¬«}tgd¢gd¢¬«}tj||«y)    Nrrr(r*rFrxryr,rgs     r Ú-test_union_categoricals_sort_false_skipresortzCTestUnionCategoricals.test_union_categoricals_sort_false_skipresort9r€r"có—tdtjg«}ttjdg«}t||gd¬«}tdtjtjdgddg¬«}t    j
||«y)Nr%rFrxr*r^rgs     r Ú*test_union_categoricals_sort_false_one_nanz@TestUnionCategoricals.test_union_categoricals_sort_false_one_nanAsg€Ü ˜#œrŸv™v˜Ó 'ˆÜ œ"Ÿ&™& #˜Ó 'ˆÜ# R¨ H¸eÔDˆÜ ¤R§V¡V¬R¯V©V°SÐ9ÀsÈCÀjÔQˆÜ
×#Ñ# F¨HÕ5r"có—ttjg«}ttjg«}t||gd¬«}ttjtjg«}t    j
||«y©NFrxr^rgs     r Ú+test_union_categoricals_sort_false_only_nanzATestUnionCategoricals.test_union_categoricals_sort_false_only_nanHsY€Ü œ"Ÿ&™&˜Ó "ˆÜ œ"Ÿ&™&˜Ó "ˆÜ# R¨ H¸eÔDˆÜ¤§¡¬¯©Ð/Ó0ˆÜ
×#Ñ# F¨HÕ5r"có—tg«}tg«}t||gd¬«}tg«}tj||«yr†r,rgs     r Ú(test_union_categoricals_sort_false_emptyz>TestUnionCategoricals.test_union_categoricals_sort_false_emptyOs=€Ü ˜‹_ˆÜ ˜‹_ˆÜ# R¨ H¸eÔDˆÜ˜r“?ˆÜ
×#Ñ# F¨HÕ5r"cóº—tddggd¢d¬«}tddggd¢d¬«}t||gd¬«}tgd    ¢gd¢d¬«}tj||«y)
NrrrfTrmrFrx)rrrrr,rgs     r Ú/test_union_categoricals_sort_false_ordered_truezETestUnionCategoricals.test_union_categoricals_sort_false_ordered_trueVsY€Ü ˜#˜s˜²ÈÔ NˆÜ ˜#˜s˜²ÈÔ NˆÜ# R¨ H¸eÔDˆÜÚ  ª_Àdô
ˆô     ×#Ñ# F¨HÕ5r"cóÖ—tddg«}tddgd¬«}t||g«}tgd¢«}tj||«t |«}t||g«}tj||«t|«}t||g«}tj||«d}t jt|¬«5t|gd    ¢g«ddd«y#1swYyxYw)
NrrrÚcategoryrCryz-all components to combine must be Categoricalr6r()    rrrrrrr8r9r:rzs      r Útest_union_categorical_unwrapz3TestUnionCategoricals.test_union_categorical_unwrap_s̀ä ˜#˜s˜Ó $ˆÜ S˜#J jÔ 1ˆÜ# R¨ HÓ-ˆÜÒ3Ó4ˆÜ
×#Ñ# F¨HÔ5ä ˜bÓ !ˆÜ# R¨ HÓ-ˆÜ
×#Ñ# F¨HÔ5ä B‹ZˆÜ# R¨ HÓ-ˆÜ
×#Ñ# F¨HÔ5à=ˆÜ ]‰]œ9¨CÔ 0ñ    6Ü  ¢OÐ4Ô 5÷    6÷    6ñ    6ús ÃCÃC(N)$Ú__name__Ú
__module__Ú __qualname__r8rXÚ parametrizeÚlistrFrGrHÚ
date_rangeÚ period_rangerrrr!r0r4r<r?rRr\rbrdrhrprvr{r}rr‚r„r‡r‰r‹rŽ©r"r rrsð„Ø ‡[[×ÑØá %‹[™$˜u›+¡t¨H£~Ð 6Ú š    Ò#5Ð 6Ú š+Ò'=Ð >àc˜2Ÿ6™6 3Ð'ؐb—f‘f˜cÐ"ؐc˜2Ÿ6™6 3¨¨R¯V©V°SÐ9ð 𠐗 ‘ ˜l¨LÓ9ؐ— ‘ ˜l¨LÓ9ؐ— ‘ ˜l¨LÓ9ð 𠐗 ‘ ˜l¨L¸\ÔJؐ— ‘ ˜l¨L¸\ÔJؐ— ‘ ˜l¨L¸\ÔJð 𠠐—‘  ¨lÓ;ؐ—‘  ¨lÓ;ؐ—‘  ¨lÓ;ð ð'    
óð8 ‡[[×јU [Ð2BÀFÐ$KÓLñ6óMó9ð:6ò 6ò6ò(ò#ò
*.ðX ‡[[×јU R¨#¨ KÓ0ñ
.ó1ð
.ò.ò.ò6ò)ò42)òh4?òl6ò6ò6ò6ò6ò6ò6ó6r"r)ÚnumpyrFr8Úpandas.core.dtypes.concatrÚpandasrHrrrÚpandas._testingÚ_testingrrr–r"r ú<module>rœs,ðÛÛ å8ã÷ñõ
÷b6òb6r"