403Webshell
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/io/parser/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pandas/tests/io/parser/__pycache__/test_comment.cpython-312.pyc
�

0	�g����dZddlmZddlZddlZddlmZddlm	Z
ejjdddgg�d��Z
ejjdid	d
iddig�d
��Zd�Zd�Zd�Zejjdgd��d��Zejjdddg�d��Zd�Zy)zf
Tests that comments are properly handled during parsing
for all of the parsers defined in parsers.py
�)�StringION)�	DataFrame�	na_values�NaNc�x�|}d}tgd�dtjdgggd���}|jdk(rDd}t	j
t|�	�5|jt|�d
|��ddd�y|jt|�d
|��}tj||�y#1swYyxYw)Nz&A,B,C
1,2.,4.#hello world
5.,NaN,10.0
�g�?g@�@�@�$@��A�B�C��columns�pyarrow�?The 'comment' option is not supported with the 'pyarrow' engine��match�#��commentr�r�np�nan�engine�pytest�raises�
ValueError�read_csvr�tm�assert_frame_equal)�all_parsersr�parser�data�expected�msg�results       �EC:\Python312\Lib\site-packages\pandas/tests/io/parser/test_comment.py�test_commentr*s���
�F��D��	�3�����-�.���H��}�}�	�!�O��
�]�]�:�S�
1�	N��O�O�H�T�N�C�9�O�M�	N��
�_�_�X�d�^�S�I�_�
N�F����&�(�+�		N����B0�0B9�read_kwargs�lineterminator�*�delim_whitespaceTc�:�|}d}d}d}|jd�r|jdd�}t}n2|jd�r!|jd|jd��}d|d	<|jd
k(rkd|vrd}nd}t	j
t|�
�5tj||d��5|jt|�fi|��ddd�ddd�y|jdk(ru|jd�rdd}t	j
t|�
�5tj||d��5|jt|�fi|��ddd�ddd�ytj||d��5|jt|�fi|��}ddd�tgd�dtjdgggd���}	tj|	�y#1swY��xYw#1swYyxYw#1swY��xYw#1swYyxYw#1swY�uxYw)Nz@# empty
A,B,C
1,2.,4.#hello world
#ignore this line
5.,NaN,10.0
z;The 'delim_whitespace' keyword in pd.read_csv is deprecatedr/�,� r-�
rrrzFThe 'lineterminator' option is not supported with the 'pyarrow' enginerrF)r�check_stacklevel�pythonz>Custom line terminators not supported in python parser \(yet\)rr
rrr)�get�replace�
FutureWarningrrrrr!�assert_produces_warningr rrrrr")
r#r,�requestr$r%�warn�depr_msgr'r(r&s
          r)�test_line_commentr=!s����F��D��D�L�H����)�*��|�|�C��%����	���)�	*��|�|�D�+�/�/�2B�"C�D�� �K�	��
�}�}�	�!��{�*�X�
�T�C�
�]�]�:�S�
1�	?��+�+��H�u��
?� �������>�+�>�
?�	?�
	�	���(�	"�{���7G�'H�O��
�]�]�:�S�
1�	?��+�+��H�u��
?� �������>�+�>�
?�	?�
	�	�	#�	#�D��5�	Q�@� �����$��?�;�?��@��	�3�����-�.���H����&�(�+�)
?�
?��	?�
	��
?�
?��	?�
	��@�@�sT�G-�6G �G-�!H�:G9�H�H� G*	�%G-�-G6�9H	�>H�H�Hc�x�|}d}tgd�dtjdgggd���}|jdk(rDd}t	j
t|�	�5|jt|�d
d��ddd�y|jt|�d
d��}tj||�y#1swYyxYw)
NzH# empty
random line
# second empty line
1,2,3
A,B,C
1,2.,4.
5.,NaN,10.0
rr
rrrrrrr�)r�skiprowsr�r#r$r%r&r'r(s      r)�test_comment_skiprowsrBUs���
�F��D��	�3�����-�.���H��}�}�	�!�O��
�]�]�:�S�
1�	E��O�O�H�T�N�C�!�O�D�	E��
�_�_�X�d�^�S�1�_�
E�F����&�(�+�	E��r+c�x�|}d}tgd�dtjdgggd���}|jdk(rDd}t	j
t|�	�5|jt|�d
d��ddd�y|jt|�d
d��}tj||�y#1swYyxYw)
Nz<# empty
# second empty line
1,2,3
A,B,C
1,2.,4.
5.,NaN,10.0
rr
rrrrrrr��r�headerrrAs      r)�test_comment_headerrGms���
�F��D��	�3�����-�.���H��}�}�	�!�O��
�]�]�:�S�
1�	C��O�O�H�T�N�C��O�B�	C��
�_�_�X�d�^�S��_�
C�F����&�(�+�		C��r+c�|�|}d}tgd�dtjdgggd���}|jdk(rEd}t	j
t|�	�5|jt|�d
dd�
�ddd�y|jt|�d
dd�
�}tj||�y#1swYyxYw)NzU# empty
# second empty line
# third empty line
X,Y,Z
1,2,3
A,B,C
1,2.,4.
5.,NaN,10.0
rr
rrrrrrrr?rD)rr@rFrrAs      r)�test_comment_skiprows_headerrI�s���
�F��D��	�3�����-�.���H��}�}�	�!�O��
�]�]�:�S�
1�	O��O�O�H�T�N�C�!�A�O�N�	O��
�_�_�X�d�^�S�1�Q�_�
O�F����&�(�+�	O��s�B2�2B;�comment_char)r�~�&�^r.�@c	��|}d}|jdk(rSd}tjt|��5|j	t|j
d|��|��ddd�y|j	t|j
d|��|��}tgd�gd�ggd	��
�}tj||�y#1swYyxYw)Nz,a,b,c
1,2,3#ignore this!
4,5,6#ignorethistoorrrr)r�rD��)r?����a�b�cr)
rrrrr rr7rr!r")r#rJr$r%r'r(r&s       r)�test_custom_comment_charrY�s���
�F�;�D�
�}�}�	�!�O��
�]�]�:�S�
1�	��O�O�����c�<�8�9�<�
�
�	�	�
�_�_�����c�<�0�1�<���F��)�Y�/��I�H����&�(�+�	�	�s�-B?�?CrF�inferc��|}d}|�tddgddgddgd��}ntgd	�ggd
���}|jdk(rDd
}tjt|��5|jt
|�d|��ddd�y|jt
|�d|��}tj||�y#1swYyxYw)Nz # notes
a,b,c
# more notes
1,2,3rV�1rW�2rX�3)rrDrQrPrUrrrrrrE)	rrrrrr rr!r")r#rFr$r%r&r'r(s       r)�test_comment_first_liner_�s����F�0�D�
�~��#�s���c�
��S�z�J�K���i�[�/�B��
�}�}�	�!�O��
�]�]�:�S�
1�	H��O�O�H�T�N�C��O�G�	H��
�_�_�X�d�^�S��_�
H�F����&�(�+�		H��s�B6�6B?c�B�|jdk(r6d}|jtjj	|t
���|}d}|jdk(rDd}tjt|��5|jt|�dd	�
�ddd�y|jt|�dd	�
�}tgd�gd�d
tjtjgdtjdgd��}tj||�y#1swYyxYw)NrXz=see gh-34002: works on the python engine but not the c engine)�reasonrzU# this is a comment
col1,col2,col3,col4
1,2,3,4#inline comment
4,5#,6,10
7,8,#N/A,11
rrrrz#N/Ar)rDr?�)rQrS�g@r	g&@)�col1�col2�col3�col4)r�applymarkerr�mark�xfail�AssertionErrorrrr rrrrr!r")r#r:rar$r%r'r(r&s        r)�"test_comment_char_in_default_valuerl�s������S� �P�����F�K�K�-�-�V�N�-�S�T�
�F�	�	��}�}�	�!�O��
�]�]�:�S�
1�	K��O�O�H�T�N�C�6�O�J�	K��
�_�_�X�d�^�S�F�_�
K�F�����"�&�&�"�&�&�)��"�&�&�$�'�		
��H����&�(�+�	K��s�6D�D)�__doc__�ior�numpyrr�pandasr�pandas._testing�_testingr!ri�parametrizer*r=rBrGrIrYr_rl��r)�<module>rvs������
���������t�e�W�o�6�,�7�,�$������B�)�3�/�2D�d�1K�L��.,��.,�b,�0,�,,�6������)G�H�,�I�,�&������G�T�?�3�,�4�,�&,ru

Youez - 2016 - github.com/yon3zu
LinuXploit