| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/pandas/tests/arrays/categorical/__pycache__/ |
Upload File : |
�
. �g�M � � � d dl Z d dlZd dlZd dlmZ d dlmZmZm Z m
Z
mZmZ d dl
mZ d dlmZ G d� d� Z G d� d� Z G d � d
� Zy)� N)�PY311)�Categorical�CategoricalIndex� DataFrame�Index�Series�StringDtype)�recode_for_categoriesc � � e Zd Zd� Zd� Zd� Zd� Zej j dg d�ddgg� d � � Z
d
� Zd� Zd� Z
ej j dd
gg d�g d�g� d� � Zd� Zd� Zd� Zd� Zej j dg d�d
dgd
dgfg d�d
dgdd
gfg d�d
dgd
dgfg d�d
dgdd
gfg d�d
dgd
dgfg d�d
dgdd
gfg d�d
dgd
dgfg d�d
dgd
dgfg d�d
dgd
gfg d�d
dgdgfg d�d
dgd
gfg d�d
dgd
gfg d�d
dgddgfg
� ej j dddg� d � � � Zd!� Zd"� Zd#� Zej j d$d%gd%ej0 gd%d%d%gg� d&� � Zd'� Zy())�TestCategoricalAPIc � � t t d� d�� }d}t j t |�� 5 |j � d d d � y # 1 sw Y y xY w)N�acbF��orderedz5Categorical.to_list is deprecated and will be removed��match)r �list�tm�assert_produces_warning�
FutureWarning�to_list)�self�cat1�msgs �JC:\Python312\Lib\site-packages\pandas/tests/arrays/categorical/test_api.py�test_to_list_deprecatedz*TestCategoricalAPI.test_to_list_deprecated sE � ��4��;��6��E��
�
'�
'�
�S�
A� ��L�L�N� � � �s �A�Ac � � t t d� d�� }t j |j t g d�� � |j rJ �t t d� t d� d�� }t j |j t g d�� � |j rJ �t t d� d�� }t j |j t g d�� � |j sJ �t t d� t d� d�� }t j |j t g d�� � |j sJ �y ) Nr Fr ��a�b�c�bca��
categoriesr )r r! r T)r r r �assert_index_equalr$ r r )r r �cat2�cat3�cat4s r �test_ordered_apiz#TestCategoricalAPI.test_ordered_api s� � ��4��;��6��
���d�o�o�u�_�/E�F��<�<����4��;�4��;��N��
���d�o�o�u�_�/E�F��<�<����4��;��5��
���d�o�o�u�_�/E�F��|�|��|��4��;�4��;��M��
���d�o�o�u�_�/E�F��|�|��|� c � � t g d�d�� }|j � }|j rJ �|j � }|j sJ �|j d� j sJ �|j d� j rJ �t
rdnd}t
j t |�� 5 d|_ d d d � t
j t |�� 5 d|_ d d d � y # 1 sw Y �5xY w# 1 sw Y y xY w)N�r r r! r Tr Fz8property 'ordered' of 'Categorical' object has no setter�can't set attributer ) r �as_unorderedr �
as_ordered�set_orderedr �pytest�raises�AttributeError)r �catr&