
    Pik                     n    d dl Zd dlmZmZmZmZmZmZm	Z	m
Z
mZ  G d d          Z G d d          ZdS )    N)	CategoricalCategoricalDtypeCategoricalIndexIndexSeries
date_rangeoption_contextperiod_rangetimedelta_rangec                       e Zd Zd ZdS )TestCategoricalReprWithFactorc                     t          g dd          }|rdnd}dd| dg}d	                    |          }t          |          }||k    sJ d S )
N)abr   r   r   cr   r   Torderedstrobjectz(['a', 'b', 'b', 'a', 'a', 'c', 'c', 'c']zCategories (3, z): ['a' < 'b' < 'c']
)r   joinrepr)selfusing_infer_stringfactordtypeexpectedactuals         }/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/pandas/tests/arrays/categorical/test_repr.py
test_printz(TestCategoricalReprWithFactor.test_print   sv    EEEtTTT+969e999
 99X&&f!!!!!!    N)__name__
__module____qualname__r     r!   r   r   r      s#        	" 	" 	" 	" 	"r!   r   c                       e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )TestCategoricalReprc                    t          j        g ddz            }t          t          g dt                              }t          j        ||          }g d}d                    |          }t          |          }||k    sJ d S )N)r         r   r)   r*   d   r   r   r   r   
categories)z7['a', 'b', 'c', 'a', 'b', ..., 'b', 'c', 'a', 'b', 'c']zLength: 600z'Categories (3, object): ['a', 'b', 'c']r   )	nparrayr   r   r   r   
from_codesr   r   )r   codesr   r   r   r   s         r   test_big_printz"TestCategoricalRepr.test_big_print   s    +++c122 E///,P,P,PQQQ'U;;;
 
 

 99X&&f!!!!!!r!   c                 d   t          g t          g dt                              }d}t          |          }||k    sJ ||k    sJ t          g t          g dt                    d          }d}t          |          }||k    sJ t          g g           }d}|t          |          k    sJ d S )Nr,   r-   z+[], Categories (3, object): ['a', 'b', 'c']Tr   z-[], Categories (3, object): ['a' < 'b' < 'c']z[], Categories (0, object): [])r   r   r   r   )r   r   r   r   s       r   test_empty_printz$TestCategoricalRepr.test_empty_print-   s    Rf!E!E!EFF@f!!!!6!!!!Rf!E!E!EtTTTBf6!!!!R$$34<<''''''r!   c                     t          t          g d                    }d}t          dd           5  |t          |          k    sJ 	 d d d            d S # 1 swxY w Y   d S )N)r)   r*         zO0    1
1    2
2    3
3    4
dtype: category
Categories (4, int64): [1, 2, 3, 4]zdisplay.width)r   r   r	   r   )r   r   exps      r   test_print_none_widthz)TestCategoricalRepr.test_print_none_width=   s    ;|||,,--C 	
 OT22 	" 	"$q''>>>>>	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"s   AAAc                    t          g ddz            }d}|r|                    dd          }t          |          |k    sJ t          g ddz            }d}|r|                    dd          }t          |          |k    sJ t          dd	          5  t          g ddz            }d}d d d            n# 1 swxY w Y   |r|                    dd          }t          |          |k    sJ d S )
N)aaaaabbcccc   z['aaaaa', 'bb', 'cccc', 'aaaaa', 'bb', ..., 'bb', 'cccc', 'aaaaa', 'bb', 'cccc']
Length: 60
Categories (3, object): ['aaaaa', 'bb', 'cccc']r   r   )u   ああああu   いいいいいu   うううううううu,  ['ああああ', 'いいいいい', 'ううううううう', 'ああああ', 'いいいいい', ..., 'いいいいい', 'ううううううう', 'ああああ', 'いいいいい', 'ううううううう']
Length: 60
Categories (3, object): ['ああああ', 'いいいいい', 'ううううううう']z display.unicode.east_asian_widthT)r   replacer   r	   )r   r   r   r   s       r   test_unicode_printz&TestCategoricalRepr.test_unicode_printH   s   ///"4553
  	9''%88HAww(""""TTTWYYZZX
  	9''%88HAww("""" >EE 	X 	XXXX[]]^^AXH	X 	X 	X 	X 	X 	X 	X 	X 	X 	X 	X 	X 	X 	X 	X  	9''%88HAww(""""""s   B::B>B>c                    t          g d          }d}t          |          |k    sJ t          g dg d          }d}t          |          |k    sJ t          g ddz            }d}t          |          |k    sJ t          t          j        d	t          j        
                    }d}t          |          |k    sJ d S )Nr)   r*   r8   z*[1, 2, 3]
Categories (3, int64): [1, 2, 3]r)   r*   r8   r)   r*   r8   r.   z3[1, 2, 3, 1, 2, 3]
Categories (3, int64): [1, 2, 3]r)   r*   r8   r9      
   zU[1, 2, 3, 4, 5, ..., 1, 2, 3, 4, 5]
Length: 50
Categories (5, int64): [1, 2, 3, 4, 5]r@   r-   zm[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
Length: 20
Categories (20, int64): [0, 1, 2, 3, ..., 16, 17, 18, 19]r   r   r0   arangeint64r   r   r:   s      r   test_categorical_reprz)TestCategoricalRepr.test_categorical_reprl   s    			""$ Aww#~~~~***yyyAAA$ Aww#~~~~",--* Aww#~~~~	"BH55566= Aww#~~~~~~r!   c                    t          g dd          }d}t          |          |k    sJ t          g dg dd          }d}t          |          |k    sJ t          g dd	z  d          }d
}t          |          |k    sJ t          t          j        dt          j                  d          }d}t          |          |k    sJ d S )NrD   Tr   z,[1, 2, 3]
Categories (3, int64): [1 < 2 < 3]rE   r/   r   z5[1, 2, 3, 1, 2, 3]
Categories (3, int64): [1 < 2 < 3]rF   rH   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]rI   rL   s      r   test_categorical_repr_orderedz1TestCategoricalRepr.test_categorical_repr_ordered   s    			4000& Aww#~~~~***yyy$OOO& Aww#~~~~",d;;;. Aww#~~~~	"BH555tDDDA Aww#~~~~~~r!   c                    t          dddd          }t          |          }d}t          |          |k    sJ t          |                    |          |          }d}t          |          |k    sJ t          dddd	d
          }t          |          }d}t          |          |k    sJ t          |                    |          |          }d}t          |          |k    sJ d S )N2011-01-01 09:00hrG   nsfreqperiodsunita  [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rV   rW   tzrX   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   r   appendr   idxr   r:   s       r   test_categorical_repr_datetimez2TestCategoricalRepr.test_categorical_repr_datetime   s   +#qtLLL 	 Aww#~~~~

3C888# 	 Aww#~~~~S!4
 
 
 ) 	 Aww#~~~~

3C888
) 	 Aww#~~~~~~r!   c                    t          dddd          }t          |d          }d}t          |          |k    sJ t          |                    |          |d	          }d
}t          |          |k    sJ t          ddddd          }t          |d          }d}t          |          |k    sJ t          |                    |          |d	          }d}t          |          |k    sJ d S )NrR   rS   rG   rT   rU   Tr   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]rO   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]rY   rZ   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^   s       r   &test_categorical_repr_datetime_orderedz:TestCategoricalRepr.test_categorical_repr_datetime_ordered   s   +#qtLLLT***O Aww#~~~~

3CFFFO Aww#~~~~S!4
 
 
 T***K
 Aww#~~~~

3CFFFK
 Aww#~~~~~~r!   c                     t          ddt          j        g          }d}t          |          |k    sJ t	          ddt          j        gd                              d          }d}t          |          |k    sJ d S )Nr)   r*   z)[1, 2, NaN]
Categories (2, int64): [1, 2]r   r-   categoryzH0      1
1      2
2    NaN
dtype: category
Categories (2, int64): [1, 2])r   r0   nanr   r   astype)r   r   c_expss_exps        r   "test_categorical_repr_int_with_nanz6TestCategoricalRepr.test_categorical_repr_int_with_nan  s    Arv''@Aww%Aq"&>22299*EE! Aww%r!   c                    t          ddd          }t          |          }d}t          |          |k    sJ t          |                    |          |          }d}t          |          |k    sJ t          dd	d          }t          |          }d
}t          |          |k    sJ t          |                    |          |          }d}t          |          |k    sJ d S )NrR   rS   rG   rV   rW   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]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]r
   r   r   r]   r^   s       r   test_categorical_repr_periodz0TestCategoricalRepr.test_categorical_repr_period  s    -CCCC1 Aww#~~~~

3C8881 Aww#~~~~93:::L Aww#~~~~

3C888L Aww#~~~~~~r!   c                    t          ddd          }t          |d          }d}t          |          |k    sJ t          |                    |          |d          }d	}t          |          |k    sJ t          d
dd          }t          |d          }d}t          |          |k    sJ t          |                    |          |d          }d}t          |          |k    sJ d S )NrR   rS   rG   rl   Tr   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]rO   aJ  [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]rm   rn   zz[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]ro   r^   s       r   $test_categorical_repr_period_orderedz8TestCategoricalRepr.test_categorical_repr_period_ordered-  s   -CCCCT***1 Aww#~~~~

3CFFF1 Aww#~~~~93:::T***P Aww#~~~~

3CFFFP Aww#~~~~~~r!   c                    t          dd          }t          |          }d}t          |          |k    sJ t          |                    |          |          }d}t          |          |k    sJ t          dd          }t          |          }d	}t          |          |k    sJ t          |                    |          |          }d
}t          |          |k    sJ d S )N1 daysrG   rW   zr[1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[us]): [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[us]): [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[us]): [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[us]): [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]r   r   r   r]   r^   s       r   test_categorical_repr_timedeltaz3TestCategoricalRepr.test_categorical_repr_timedeltaJ  s    h222M Aww#~~~~

3C888M Aww#~~~~i444J Aww#~~~~

3C888J Aww#~~~~~~r!   c                    t          dd          }t          |d          }d}t          |          |k    sJ t          |                    |          |d          }d}t          |          |k    sJ t          d	d
          }t          |d          }d}t          |          |k    sJ t          |                    |          |d          }d}t          |          |k    sJ d S )Nrt   rG   ru   Tr   zv[1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[us]): [1 days < 2 days < 3 days < 4 days < 5 days]rO   z[1 days, 2 days, 3 days, 4 days, 5 days, 1 days, 2 days, 3 days, 4 days, 5 days]
Categories (5, timedelta64[us]): [1 days < 2 days < 3 days < 4 days < 5 days]rv   r@   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[us]): [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[us]): [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]rw   r^   s       r   'test_categorical_repr_timedelta_orderedz;TestCategoricalRepr.test_categorical_repr_timedelta_orderedk  s    h222T***Q Aww#~~~~

3CFFFQ Aww#~~~~i444T***K Aww#~~~~

3CFFFK Aww#~~~~~~r!   c                    t          t          g d                    }d}t          |          |k    sJ t          t          t          j        dt          j                                      }d}t          |          |k    sJ d S )NrD   zRCategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=False, dtype='category')rH   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')r   r   r   r0   rJ   rK   )r   r_   r:   is       r   test_categorical_index_reprz/TestCategoricalRepr.test_categorical_index_repr  s|    {9995566fCyyC[2RX)F)F)FGGHH PAww#~~~~~~r!   c                    t          t          g dd                    }d}t          |          |k    sJ t          t          t          j        dt          j                  d                    }d}t          |          |k    sJ d S )NrD   Tr   zQCategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=True, dtype='category')rH   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')r|   )r   r}   r:   s      r   #test_categorical_index_repr_orderedz7TestCategoricalRepr.test_categorical_index_repr_ordered  s    [DAAABBeAww#~~~~[2RX)F)F)FPTUUUVV OAww#~~~~~~r!   c                    t          ddd          }t          t          |                    }d}t          |          |k    sJ t          dddd          }t          t          |                    }d}t          |          |k    sJ d S )	NrR   rS   rG   rl   aQ  CategoricalIndex(['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')rY   rV   rW   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'))r   r   r   r   r   r_   r}   r:   s       r   $test_categorical_index_repr_datetimez8TestCategoricalRepr.test_categorical_index_repr_datetime  s    +#qAAA[--..k
 Aww#~~~~+#q\RRR[--..I
 Aww#~~~~~~r!   c                    t          ddd          }t          t          |d                    }d}t          |          |k    sJ t          dddd	          }t          t          |d                    }d
}t          |          |k    sJ t          t          |                    |          d                    }d}t          |          |k    sJ d S )NrR   rS   rG   rl   Tr   aP  CategoricalIndex(['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')rY   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')aA  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', '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'))r   r   r   r   r]   r   s       r   ,test_categorical_index_repr_datetime_orderedz@TestCategoricalRepr.test_categorical_index_repr_datetime_ordered  s    +#qAAA[d;;;<<j
 Aww#~~~~+#q\RRR[d;;;<<H
 Aww#~~~~[C$GGGHHH Aww#~~~~~~r!   c                 D   t          ddd          }t          t          |                    }d}t          |          |k    sJ t          ddd          }t          t          |                    }d}t          |          |k    sJ t          ddd          }t          t          |                    }d	}t          |          |k    sJ t          ddd
          }t          t          |                    }d}t          |          |k    sJ t          t          |                    |                              }d}t          |          |k    sJ t          ddd
          }t          t          |                    }d}t          |          |k    sJ d S )NrR   rS   r)   rl   zfCategoricalIndex(['2011-01-01 09:00'], categories=[2011-01-01 09:00], ordered=False, dtype='category')r*   zCategoricalIndex(['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')r8   zCategoricalIndex(['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')rG   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')rm   rn   zCategoricalIndex(['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'))r
   r   r   r   r]   r   s       r   "test_categorical_index_repr_periodz6TestCategoricalRepr.test_categorical_index_repr_period  s   -CCCC[--..zAww#~~~~-CCCC[--.. aAww#~~~~-CCCC[--.. GAww#~~~~-CCCC[--..\ Aww#~~~~[C99::\ Aww#~~~~93:::[--.. yAww#~~~~~~r!   c                 "   t          ddd          }t          t          |d                    }d}t          |          |k    sJ t          dd	d          }t          t          |d                    }d
}t          |          |k    sJ d S )NrR   rS   rG   rl   Tr   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')rm   rn   zCategoricalIndex(['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'))r
   r   r   r   r   s       r   *test_categorical_index_repr_period_orderedz>TestCategoricalRepr.test_categorical_index_repr_period_ordered  s    -CCCC[d;;;<<[ Aww#~~~~93:::[d;;;<< xAww#~~~~~~r!   c                    t          dd          }t          t          |                    }d}t          |          |k    sJ t          dd          }t          t          |                    }d}t          |          |k    sJ d S )Nrt   rG   ru   zCategoricalIndex(['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')rv   rH   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')r   r   r   r   r   s       r   %test_categorical_index_repr_timedeltaz9TestCategoricalRepr.test_categorical_index_repr_timedelta  s    h222[--.. oAww#~~~~i444[--..O Aww#~~~~~~r!   c                    t          dd          }t          t          |d                    }d}t          |          |k    sJ t          dd          }t          t          |d                    }d	}t          |          |k    sJ d S )
Nrt   rG   ru   Tr   zCategoricalIndex(['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')rv   rH   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   r   s       r   -test_categorical_index_repr_timedelta_orderedzATestCategoricalRepr.test_categorical_index_repr_timedelta_ordered  s    h222[d;;;<< nAww#~~~~i444[d;;;<<N Aww#~~~~~~r!   c                 V    t          t          g d                    }d}||k    sJ d S )N)r)   2r8   r9   z5[1, '2', 3, 4]
Categories (4, object): [1, 3, 4, '2'])r   r   )r   resultr   s      r   test_categorical_str_reprz-TestCategoricalRepr.test_categorical_str_repr#  s7    k...1122K!!!!!!r!   c                     t          g d|          }t          t          |                    }d|d}||k    sJ d S )N)applebananacherryr   r-   z7['apple', 'banana', 'cherry', 'cherry']
Categories (3, z ): ['apple', 'banana', 'cherry'])r   r   r   )r   string_dtype_no_objectrh   r   r   s        r   "test_categorical_with_string_dtypez6TestCategoricalRepr.test_categorical_with_string_dtype)  sk    333;Q
 
 
 k!nn%% INd  I  I  I!!!!!!r!   N)r"   r#   r$   r4   r6   r;   rB   rM   rP   r`   rb   rj   rp   rr   rx   rz   r~   r   r   r   r   r   r   r   r   r   r%   r!   r   r'   r'      ss       " " "( ( ( 	" 	" 	""# "# "#H  6  6> > >@! ! !F	  	  	   :  :  B  B      &  :% % %N        " " "" " " " "r!   r'   )numpyr0   pandasr   r   r   r   r   r   r	   r
   r   r   r'   r%   r!   r   <module>r      s       
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

" 
" 
" 
" 
" 
" 
" 
"T" T" T" T" T" T" T" T" T" T"r!   