| 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/frame/methods/__pycache__/ |
Upload File : |
�
/ �g* � �P � d dl Zd dlZd dlZd dlmZmZmZ d dlm Z
G d� d� Zy)� N)� DataFrame�Series�
date_rangec �B � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zy
)�TestDataFrameRoundc �
� t � }t j ||j � � t g d�g d�d�� }t g d�g d�d�� }t j |j � |� d}t g d�g d�d�� }t j |j |� |� t j t j ||� |� ddg}d }t j t |�
� 5 |j |� d d d � t g d�g d�d�� }ddd�}t j |j |� |� t g d�g d�d�� }d
di}t j |j |� |� ddd�} t j |j | � |� ddd�}
d}t j t |�
� 5 |j |
� d d d � ddd�}
t j t |�
� 5 |j |
� d d d � t |
� }t j t |�
� 5 |j |� d d d � dddgd�}
t j t |�
� 5 |j |
� d d d � t |
� }t j t |�
� 5 |j |� d d d � t |
� }t j t |�
� 5 |j |� d d d � t |
� }t j t |�
� 5 |j |� d d d � ddd�}|dz }
t g d�g d�d�� }t j |
j |� |� t t j dd�� }t j t |�
� 5 |j |� d d d � t j |d j d� |d � d}t g d�g d�d�� }d|j _ d|j _ t j |j |� |� t j |d j |� |d � t j |j |� d |d � y # 1 sw Y ���xY w# 1 sw Y ���xY w# 1 sw Y ���xY w# 1 sw Y ���xY w# 1 sw Y ��mxY w# 1 sw Y ��:xY w# 1 sw Y ��xY w# 1 sw Y ���xY w# 1 sw Y ��OxY w)N�g+����?g�C�l� @g�C�l�@�gX9��v��?g�Zd;�@g�Zd;� @��col1�col2�� �?� @� @� )g�Q����?g�(\�� @g�(\��@)g�G�z��?gףp=
�@gףp=
� @� z4decimals must be an integer, a dict-like or a Series��match)皙�����?g������ @g������@)g333333�?皙����@g������ @r
)�col3r
g �?z#Values in decimals must be integers�foo�������d )g �[@�� i6 )g Y@�� i, r �cols)
r �tm�assert_frame_equal�round�np�pytest�raises� TypeErrorr �nan�assert_series_equal�columns�name)�self�df�expected_rounded�decimals�
round_list�msg�
round_dict�expected_partially_rounded�partial_round_dict�wrong_round_dict�non_int_round_dict�non_int_round_Series�negative_round_dict�big_df�expected_neg_rounded�nan_round_Seriess �GC:\Python312\Lib\site-packages\pandas/tests/frame/methods/test_round.py�
test_roundzTestDataFrameRound.test_round s� � � �[��
���b�"�(�(�*�-� � 5�?T�U�
V�� %�o��%W�X��
���b�h�h�j�*:�;� ��$�'�1C�D�
�� ���b�h�h�x�0�2B�C� ���b�h�h�r�8�4�6F�G� ��V�
�D��
�]�]�9�C�
0� !��H�H�Z� � !� %�$�.@�A�
�� ��+�
�
���b�h�h�z�2�4D�E� &/�*�O�D�&
�"� %�a�[��
���b�h�h�'9�:�<V�W� %&�q�1��
���b�h�h�'7�8�:T�U� '(��5��3��
�]�]�9�C�
0� )��H�H�'�(� )� '(��7��
�]�]�9�C�
0� )��H�H�'�(� )� &�&8�9��
�]�]�9�C�
0� +��H�H�)�*� +� '(�!�Q��8��
�]�]�9�C�
0� )��H�H�'�(� )� &�&8�9��
�]�]�9�C�
0� +��H�H�)�*� +� &�&8�9��
�]�]�9�C�
0� +��H�H�)�*� +� &�&8�9��
�]�]�9�C�
0� +��H�H�)�*� +� (*�2�6���c���(�&�0A�B�
�� ���f�l�l�+>�?�AU�V� "�2�6�6�1�"=�>��
�]�]�9�C�
0� '��H�H�%�&� '� ���r�&�z�/�/��2�4D�V�4L�M� ��$�'�1C�D�
�� !��
�
��(.�� � �%�
���b�h�h�x�0�2B�C� ���r�&�z�/�/��9�;K�F�;S�T�
���r�x�x��1�&�9�;K�F�;S�T�g !� !��0 )� )��
)� )�� +� +��
)� )�� +� +��
+� +�� +� +�� '� '�sl �;S�S$�S1�S>�T�T�T%�T2� T?�S!�$S.�1S;�>T�T�T"�%T/�2T<�?U c �6 � t ddgddgg� }t j |d�� }t ddgd d
gg� }t j ||� d}t j t |�� 5 t j |d|�
� d d d � y # 1 sw Y y xY w)N�{�G�z�?g�(\��?���Q��?g
ףp=
@r )r. r r � g @z$the 'out' parameter is not supportedr )r. �out)r r# r"