zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
U
¬ý°diã@sLddlZddlmZmZmZmZmZmZm    Z    Gdd„dƒZ
Gdd„dƒZ dS)éN)Ú CategoricalÚCategoricalIndexÚSeriesÚ
date_rangeÚoption_contextÚ period_rangeÚtimedelta_rangec@seZdZdd„ZdS)ÚTestCategoricalReprWithFactorcCs*ddg}d |¡}t|ƒ}||ks&t‚dS)Nz(['a', 'b', 'b', 'a', 'a', 'c', 'c', 'c']z)Categories (3, object): ['a' < 'b' < 'c']Ú
)ÚjoinÚreprÚAssertionError©ÚselfZfactorÚexpectedÚactual©rú`d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/arrays/categorical/test_repr.pyÚ
test_prints þ
z(TestCategoricalReprWithFactor.test_printN)Ú__name__Ú
__module__Ú __qualname__rrrrrr    sr    c@s¼eZdZdd„Zdd„Zdd„Zdd„Zd    d
„Zd d „Zd d„Z    dd„Z
dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-S).ÚTestCategoricalReprcCsPtddddddgddddgdd    }d
d d g}d  |¡}t|ƒ}||ksLt‚dS)NrééédÚaÚbÚcT)Zfastpathz7['a', 'b', 'c', 'a', 'b', ..., 'b', 'c', 'a', 'b', 'c']z Length: 600z'Categories (3, object): ['a', 'b', 'c']r
)rr r r rrrrÚtest_big_prints$ý
z"TestCategoricalRepr.test_big_printcCs‚tgdddgƒ}d}t|ƒ}||ks(t‚||ks4t‚tgdddgdd}d}t|ƒ}||ks`t‚tggƒ}d}|t|ƒks~t‚dS)    Nrrrz+[], Categories (3, object): ['a', 'b', 'c']T©Úorderedz-[], Categories (3, object): ['a' < 'b' < 'c']z[], Categories (0, object): [])rr r rrrrÚtest_empty_print's   
z$TestCategoricalRepr.test_empty_printc    CsBttddddgƒƒ}d}tddƒ|t|ƒks4t‚W5QRXdS)NrréézO0    1
1    2
2    3
3    4
dtype: category
Categories (4, int64): [1, 2, 3, 4]z display.width)rrrr r )rrÚexprrrÚtest_print_none_width7s
ÿ z)TestCategoricalRepr.test_print_none_widthc    CsŒtdddgdƒ}d}t|ƒ|ks&t‚tdddgdƒ}d    }t|ƒ|ksLt‚td
d ƒ,tdddgdƒ}d    }t|ƒ|ks~t‚W5QRXdS) NZaaaaaZbbZccccéz‹['aaaaa', 'bb', 'cccc', 'aaaaa', 'bb', ..., 'bb', 'cccc', 'aaaaa', 'bb', 'cccc']
Length: 60
Categories (3, object): ['aaaaa', 'bb', 'cccc']u ああああuいいいいいuうううううううu,['ああああ', 'いいいいい', 'ううううううう', 'ああああ', 'いいいいい', ..., 'いいいいい', 'ううううううう', 'ああああ', 'いいいいい', 'ううううううう']
Length: 60
Categories (3, object): ['ああああ', 'いいいいい', 'ううううううう']z display.unicode.east_asian_widthT)rr r r)rrrrrrÚtest_unicode_printBs z&TestCategoricalRepr.test_unicode_printcCsªtdddgƒ}d}t|ƒ|ks"t‚tddddddgdddgd}d}t|ƒ|ksTt‚tdddddgd    ƒ}d
}t|ƒ|ks~t‚ttjd tjd ƒ}d }t|ƒ|ks¦t‚dS)Nrrr#z*[1, 2, 3]
Categories (3, int64): [1, 2, 3]©Ú
categoriesz3[1, 2, 3, 1, 2, 3]
Categories (3, int64): [1, 2, 3]r$éé
zU[1, 2, 3, 4, 5, ..., 1, 2, 3, 4, 5]
Length: 50
Categories (5, int64): [1, 2, 3, 4, 5]r'©Zdtypezm[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
Length: 20
Categories (20, int64): [0, 1, 2, 3, ..., 16, 17, 18, 19]©rr r ÚnpÚarangeÚint64©rrr%rrrÚtest_categorical_repr]sz)TestCategoricalRepr.test_categorical_reprcCs¸tdddgdd}d}t|ƒ|ks&t‚tddddddgdddgdd}d}t|ƒ|ksZt‚tdddd    d
gd dd}d }t|ƒ|ksˆt‚ttjd tjddd}d}t|ƒ|ks´t‚dS)Nrrr#Tr z,[1, 2, 3]
Categories (3, int64): [1 < 2 < 3]©r*r!z5[1, 2, 3, 1, 2, 3]
Categories (3, int64): [1 < 2 < 3]r$r+r,zY[1, 2, 3, 4, 5, ..., 1, 2, 3, 4, 5]
Length: 50
Categories (5, int64): [1 < 2 < 3 < 4 < 5]r'r-zq[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
Length: 20
Categories (20, int64): [0 < 1 < 2 < 3 ... 16 < 17 < 18 < 19]r.r2rrrÚtest_categorical_repr_orderedxs z1TestCategoricalRepr.test_categorical_repr_orderedcCs¦tdddd}t|ƒ}d}t|ƒ|ks*t‚t| |¡|d}d}t|ƒ|ksPt‚tddddd    }t|ƒ}d
}t|ƒ|ks|t‚t| |¡|d}d }t|ƒ|ks¢t‚dS) Nú2011-01-01 09:00ÚHr+©ÚfreqÚperiodsa[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00]
Categories (5, datetime64[ns]): [2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00,
                                 2011-01-01 12:00:00, 2011-01-01 13:00:00]r)a}[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00, 2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00]
Categories (5, datetime64[ns]): [2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00,
                                 2011-01-01 12:00:00, 2011-01-01 13:00:00]ú
US/Eastern©r9r:Útza•[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00]
Categories (5, datetime64[ns, US/Eastern]): [2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00,
                                             2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00,
                                             2011-01-01 13:00:00-05:00]a[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00, 2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00]
Categories (5, datetime64[ns, US/Eastern]): [2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00,
                                             2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00,
                                             2011-01-01 13:00:00-05:00]©rrr r Úappend©rÚidxrr%rrrÚtest_categorical_repr_datetime“s$ÿ    ÿ ÿ ÿz2TestCategoricalRepr.test_categorical_repr_datetimecCs²tdddd}t|dd}d}t|ƒ|ks.t‚t| |¡|dd}d    }t|ƒ|ksVt‚tdddd
d }t|dd}d }t|ƒ|ks†t‚t| |¡|dd}d }t|ƒ|ks®t‚dS)Nr6r7r+r8Tr a[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00]
Categories (5, datetime64[ns]): [2011-01-01 09:00:00 < 2011-01-01 10:00:00 < 2011-01-01 11:00:00 <
                                 2011-01-01 12:00:00 < 2011-01-01 13:00:00]r4a[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00, 2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00]
Categories (5, datetime64[ns]): [2011-01-01 09:00:00 < 2011-01-01 10:00:00 < 2011-01-01 11:00:00 <
                                 2011-01-01 12:00:00 < 2011-01-01 13:00:00]r;r<a™[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00]
Categories (5, datetime64[ns, US/Eastern]): [2011-01-01 09:00:00-05:00 < 2011-01-01 10:00:00-05:00 <
                                             2011-01-01 11:00:00-05:00 < 2011-01-01 12:00:00-05:00 <
                                             2011-01-01 13:00:00-05:00]a [2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00, 2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00]
Categories (5, datetime64[ns, US/Eastern]): [2011-01-01 09:00:00-05:00 < 2011-01-01 10:00:00-05:00 <
                                             2011-01-01 11:00:00-05:00 < 2011-01-01 12:00:00-05:00 <
                                             2011-01-01 13:00:00-05:00]r>r@rrrÚ&test_categorical_repr_datetime_orderedÑs  z:TestCategoricalRepr.test_categorical_repr_datetime_orderedcCsVtddtjgƒ}d}t|ƒ|ks$t‚tddtjgdd d¡}d}t|ƒ|ksRt‚dS)Nrrz)[1, 2, NaN]
Categories (2, int64): [1, 2]Úobjectr-ÚcategoryzH0      1
1      2
2    NaN
dtype: category
Categories (2, int64): [1, 2])rr/Únanr r rZastype)rrZc_expÚsZs_exprrrÚ"test_categorical_repr_int_with_nanòs z6TestCategoricalRepr.test_categorical_repr_int_with_nancCs¤tdddd}t|ƒ}d}t|ƒ|ks*t‚t| |¡|d}d}t|ƒ|ksPt‚tdd    dd}t|ƒ}d
}t|ƒ|kszt‚t| |¡|d}d }t|ƒ|ks t‚dS) Nr6r7r+r8zì[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
Categories (5, period[H]): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
                            2011-01-01 13:00]r)aF[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00, 2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
Categories (5, period[H]): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
                            2011-01-01 13:00]ú2011-01ÚMzv[2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
Categories (5, period[M]): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]z£[2011-01, 2011-02, 2011-03, 2011-04, 2011-05, 2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
Categories (5, period[M]): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]©rrr r r?r@rrrÚtest_categorical_repr_periodýsz0TestCategoricalRepr.test_categorical_repr_periodcCs°tdddd}t|dd}d}t|ƒ|ks.t‚t| |¡|dd}d    }t|ƒ|ksVt‚td
d dd}t|dd}d }t|ƒ|ks„t‚t| |¡|dd}d }t|ƒ|ks¬t‚dS)Nr6r7r+r8Tr zð[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
Categories (5, period[H]): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
                            2011-01-01 13:00]r4aJ[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00, 2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
Categories (5, period[H]): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
                            2011-01-01 13:00]rIrJzz[2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
Categories (5, period[M]): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]z§[2011-01, 2011-02, 2011-03, 2011-04, 2011-05, 2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
Categories (5, period[M]): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]rKr@rrrÚ$test_categorical_repr_period_ordereds  z8TestCategoricalRepr.test_categorical_repr_period_orderedcCs tddd}t|ƒ}d}t|ƒ|ks(t‚t| |¡|d}d}t|ƒ|ksNt‚tddd}t|ƒ}d    }t|ƒ|ksvt‚t| |¡|d}d
}t|ƒ|ksœt‚dS) Nú1 daysr+©r:zr[1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[ns]): [1 days, 2 days, 3 days, 4 days, 5 days]r)zš[1 days, 2 days, 3 days, 4 days, 5 days, 1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[ns]): [1 days, 2 days, 3 days, 4 days, 5 days]ú1 hoursr'a¹[0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00, 3 days 01:00:00, 4 days 01:00:00, ..., 15 days 01:00:00, 16 days 01:00:00, 17 days 01:00:00, 18 days 01:00:00, 19 days 01:00:00]
Length: 20
Categories (20, timedelta64[ns]): [0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00,
                                   3 days 01:00:00, ..., 16 days 01:00:00, 17 days 01:00:00,
                                   18 days 01:00:00, 19 days 01:00:00]a¹[0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00, 3 days 01:00:00, 4 days 01:00:00, ..., 15 days 01:00:00, 16 days 01:00:00, 17 days 01:00:00, 18 days 01:00:00, 19 days 01:00:00]
Length: 40
Categories (20, timedelta64[ns]): [0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00,
                                   3 days 01:00:00, ..., 16 days 01:00:00, 17 days 01:00:00,
                                   18 days 01:00:00, 19 days 01:00:00]©rrr r r?r@rrrÚtest_categorical_repr_timedelta7s  z3TestCategoricalRepr.test_categorical_repr_timedeltacCs¬tddd}t|dd}d}t|ƒ|ks,t‚t| |¡|dd}d}t|ƒ|ksTt‚td    d
d}t|dd}d }t|ƒ|ks€t‚t| |¡|dd}d }t|ƒ|ks¨t‚dS) NrNr+rOTr zv[1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[ns]): [1 days < 2 days < 3 days < 4 days < 5 days]r4zž[1 days, 2 days, 3 days, 4 days, 5 days, 1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[ns]): [1 days < 2 days < 3 days < 4 days < 5 days]rPr'a½[0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00, 3 days 01:00:00, 4 days 01:00:00, ..., 15 days 01:00:00, 16 days 01:00:00, 17 days 01:00:00, 18 days 01:00:00, 19 days 01:00:00]
Length: 20
Categories (20, timedelta64[ns]): [0 days 01:00:00 < 1 days 01:00:00 < 2 days 01:00:00 <
                                   3 days 01:00:00 ... 16 days 01:00:00 < 17 days 01:00:00 <
                                   18 days 01:00:00 < 19 days 01:00:00]a½[0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00, 3 days 01:00:00, 4 days 01:00:00, ..., 15 days 01:00:00, 16 days 01:00:00, 17 days 01:00:00, 18 days 01:00:00, 19 days 01:00:00]
Length: 40
Categories (20, timedelta64[ns]): [0 days 01:00:00 < 1 days 01:00:00 < 2 days 01:00:00 <
                                   3 days 01:00:00 ... 16 days 01:00:00 < 17 days 01:00:00 <
                                   18 days 01:00:00 < 19 days 01:00:00]rQr@rrrÚ'test_categorical_repr_timedelta_orderedXs    z;TestCategoricalRepr.test_categorical_repr_timedelta_orderedcCsVttdddgƒƒ}d}t|ƒ|ks&t‚tttjdtjdƒƒ}d}t|ƒ|ksRt‚dS)Nrrr#zRCategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=False, dtype='category')r,r-z{CategoricalIndex([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], categories=[0, 1, 2, 3, ..., 6, 7, 8, 9], ordered=False, dtype='category')©rrr r r/r0r1)rrAr%ÚirrrÚtest_categorical_index_reprys z/TestCategoricalRepr.test_categorical_index_reprcCs^ttdddgddƒ}d}t|ƒ|ks*t‚tttjdtjdddƒ}d    }t|ƒ|ksZt‚dS)
Nrrr#Tr zQCategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=True, dtype='category')r,r-zzCategoricalIndex([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], categories=[0, 1, 2, 3, ..., 6, 7, 8, 9], ordered=True, dtype='category')rT)rrUr%rrrÚ#test_categorical_index_repr_ordered‚s z7TestCategoricalRepr.test_categorical_index_repr_orderedcCsbtdddd}tt|ƒƒ}d}t|ƒ|ks.t‚tddddd}tt|ƒƒ}d}t|ƒ|ks^t‚dS)    Nr6r7r+r8aQCategoricalIndex(['2011-01-01 09:00:00', '2011-01-01 10:00:00',
                  '2011-01-01 11:00:00', '2011-01-01 12:00:00',
                  '2011-01-01 13:00:00'],
                 categories=[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00], ordered=False, dtype='category')r;r<aCategoricalIndex(['2011-01-01 09:00:00-05:00', '2011-01-01 10:00:00-05:00',
                  '2011-01-01 11:00:00-05:00', '2011-01-01 12:00:00-05:00',
                  '2011-01-01 13:00:00-05:00'],
                 categories=[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00], ordered=False, dtype='category'))rrrr r ©rrArUr%rrrÚ$test_categorical_index_repr_datetime‹s  z8TestCategoricalRepr.test_categorical_index_repr_datetimecCs”tdddd}tt|ddƒ}d}t|ƒ|ks2t‚tddddd    }tt|ddƒ}d
}t|ƒ|ksft‚tt| |¡ddƒ}d }t|ƒ|kst‚dS) Nr6r7r+r8Tr aPCategoricalIndex(['2011-01-01 09:00:00', '2011-01-01 10:00:00',
                  '2011-01-01 11:00:00', '2011-01-01 12:00:00',
                  '2011-01-01 13:00:00'],
                 categories=[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, 2011-01-01 13:00:00], ordered=True, dtype='category')r;r<aŒCategoricalIndex(['2011-01-01 09:00:00-05:00', '2011-01-01 10:00:00-05:00',
                  '2011-01-01 11:00:00-05:00', '2011-01-01 12:00:00-05:00',
                  '2011-01-01 13:00:00-05:00'],
                 categories=[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00], ordered=True, dtype='category')aACategoricalIndex(['2011-01-01 09:00:00-05:00', '2011-01-01 10:00:00-05:00',
                  '2011-01-01 11:00:00-05:00', '2011-01-01 12:00:00-05:00',
                  '2011-01-01 13:00:00-05:00', '2011-01-01 09:00:00-05:00',
                  '2011-01-01 10:00:00-05:00', '2011-01-01 11:00:00-05:00',
                  '2011-01-01 12:00:00-05:00', '2011-01-01 13:00:00-05:00'],
                 categories=[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00], ordered=True, dtype='category'))rrrr r r?rXrrrÚ,test_categorical_index_repr_datetime_orderedžsz@TestCategoricalRepr.test_categorical_index_repr_datetime_orderedcCstdddd}tt|ƒƒ}d}t|ƒ|ks.t‚tdddd}tt|ƒƒ}d}t|ƒ|ks\t‚tdddd}tt|ƒƒ}d    }t|ƒ|ksŠt‚tddd
d}tt|ƒƒ}d }t|ƒ|ks¸t‚tt| |¡ƒƒ}d }t|ƒ|ksÞt‚td dd
d}tt|ƒƒ}d}t|ƒ|kst‚dS)Nr6r7rr8zfCategoricalIndex(['2011-01-01 09:00'], categories=[2011-01-01 09:00], ordered=False, dtype='category')rzŒCategoricalIndex(['2011-01-01 09:00', '2011-01-01 10:00'], categories=[2011-01-01 09:00, 2011-01-01 10:00], ordered=False, dtype='category')r#z²CategoricalIndex(['2011-01-01 09:00', '2011-01-01 10:00', '2011-01-01 11:00'], categories=[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00], ordered=False, dtype='category')r+a!CategoricalIndex(['2011-01-01 09:00', '2011-01-01 10:00', '2011-01-01 11:00',
                  '2011-01-01 12:00', '2011-01-01 13:00'],
                 categories=[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00], ordered=False, dtype='category')a©CategoricalIndex(['2011-01-01 09:00', '2011-01-01 10:00', '2011-01-01 11:00',
                  '2011-01-01 12:00', '2011-01-01 13:00', '2011-01-01 09:00',
                  '2011-01-01 10:00', '2011-01-01 11:00', '2011-01-01 12:00',
                  '2011-01-01 13:00'],
                 categories=[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00], ordered=False, dtype='category')rIrJz¤CategoricalIndex(['2011-01', '2011-02', '2011-03', '2011-04', '2011-05'], categories=[2011-01, 2011-02, 2011-03, 2011-04, 2011-05], ordered=False, dtype='category'))rrrr r r?rXrrrÚ"test_categorical_index_repr_period»s.     z6TestCategoricalRepr.test_categorical_index_repr_periodcCshtdddd}tt|ddƒ}d}t|ƒ|ks2t‚tdd    dd}tt|ddƒ}d
}t|ƒ|ksdt‚dS) Nr6r7r+r8Tr a CategoricalIndex(['2011-01-01 09:00', '2011-01-01 10:00', '2011-01-01 11:00',
                  '2011-01-01 12:00', '2011-01-01 13:00'],
                 categories=[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00], ordered=True, dtype='category')rIrJz£CategoricalIndex(['2011-01', '2011-02', '2011-03', '2011-04', '2011-05'], categories=[2011-01, 2011-02, 2011-03, 2011-04, 2011-05], ordered=True, dtype='category'))rrrr r rXrrrÚ*test_categorical_index_repr_period_orderedâsz>TestCategoricalRepr.test_categorical_index_repr_period_orderedcCs\tddd}tt|ƒƒ}d}t|ƒ|ks,t‚tddd}tt|ƒƒ}d}t|ƒ|ksXt‚dS)NrNr+rOzšCategoricalIndex(['1 days', '2 days', '3 days', '4 days', '5 days'], categories=[1 days, 2 days, 3 days, 4 days, 5 days], ordered=False, dtype='category')rPr,aÒCategoricalIndex(['0 days 01:00:00', '1 days 01:00:00', '2 days 01:00:00',
                  '3 days 01:00:00', '4 days 01:00:00', '5 days 01:00:00',
                  '6 days 01:00:00', '7 days 01:00:00', '8 days 01:00:00',
                  '9 days 01:00:00'],
                 categories=[0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00, 3 days 01:00:00, ..., 6 days 01:00:00, 7 days 01:00:00, 8 days 01:00:00, 9 days 01:00:00], ordered=False, dtype='category')©rrrr r rXrrrÚ%test_categorical_index_repr_timedeltaðs    z9TestCategoricalRepr.test_categorical_index_repr_timedeltacCsdtddd}tt|ddƒ}d}t|ƒ|ks0t‚tddd}tt|ddƒ}d    }t|ƒ|ks`t‚dS)
NrNr+rOTr z™CategoricalIndex(['1 days', '2 days', '3 days', '4 days', '5 days'], categories=[1 days, 2 days, 3 days, 4 days, 5 days], ordered=True, dtype='category')rPr,aÑCategoricalIndex(['0 days 01:00:00', '1 days 01:00:00', '2 days 01:00:00',
                  '3 days 01:00:00', '4 days 01:00:00', '5 days 01:00:00',
                  '6 days 01:00:00', '7 days 01:00:00', '8 days 01:00:00',
                  '9 days 01:00:00'],
                 categories=[0 days 01:00:00, 1 days 01:00:00, 2 days 01:00:00, 3 days 01:00:00, ..., 6 days 01:00:00, 7 days 01:00:00, 8 days 01:00:00, 9 days 01:00:00], ordered=True, dtype='category')r]rXrrrÚ-test_categorical_index_repr_timedelta_ordereds  zATestCategoricalRepr.test_categorical_index_repr_timedelta_orderedcCs(ttddddgƒƒ}d}||ks$t‚dS)NrÚ2r#r$z5[1, '2', 3, 4]
Categories (4, object): [1, 3, 4, '2'])r rr )rÚresultrrrrÚtest_categorical_str_reprsz-TestCategoricalRepr.test_categorical_str_reprN)rrrrr"r&r(r3r5rBrCrHrLrMrRrSrVrWrYrZr[r\r^r_rbrrrrrs,  >! !!        'r) Únumpyr/Zpandasrrrrrrrr    rrrrrÚ<module>s$