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 :  /Python312/Lib/site-packages/pandas/tests/io/pytables/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python312/Lib/site-packages/pandas/tests/io/pytables/__pycache__/test_errors.cpython-312.pyc
�

0	�g� �	��ddlZddlmZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
ZmZmZddlmZddlmZmZej,j.Zd�Zd�Zd�Zd	�Zd
�Zd�Zej,j?ded
ddd��ee d��g�d��Z!d�Z"d�Z#d�Z$ej,j?dddgddg�d��Z%y)�N)�BytesIO)�CategoricalIndex�	DataFrame�HDFStore�Index�
MultiIndex�_testing�
date_range�read_hdf)�ensure_clean_store)�Term�_maybe_adjust_namec�r�tdtjd�jd�zt	td�t��t	td�D�cgc]}d|����	c}t����}t|�5}|jd	|�d
}tjt|��5|jd	dg�
�ddd�d}tjt|��5|jd	dg��ddd�ddd�ycc}w#1swY�QxYw#1swY�#xYw#1swYyxYw)N皙�����?�x����ABCD��dtyper�i-��columns�index�dfzqcannot pass a column specification when reading a Fixed format store. this store must be selected in its entirety��match�A)rzucannot pass a where specification when reading from a Fixed format store. this store must be selected in its entiretyz	columns=A��where)r�np�arange�reshaper�list�object�ranger�put�pytest�raises�	TypeError�select)�
setup_path�ir�store�msgs     �FC:\Python312\Lib\site-packages\pandas/tests/io/pytables/test_errors.py�test_pass_spec_to_storerr2s��	��b�i�i��n�$�$�W�-�-��d�6�l�&�1��u�R�y�1�!�r�!��X�1��@�
�B�
�J�	'�
6�5�
�	�	�$���
A�	��]�]�9�C�
0�	.��L�L���u�L�-�	.�
H�	��]�]�9�C�
0�	6��L�L��{�_�L�5�	6�
6�
6��2�	.�	.��	6�	6��
6�
6�sB�D�0D-�0D�%D-�*D!�?D-�D	�D-�!D*	�&D-�-D6c�v�tdgd�i�}tdgd�itdd����}t|�5}|jd|d	�
�t	j
d�}t
jt|��5|jd|d	d
��ddd�ddd�y#1swY�xYw#1swYyxYw)N�a)���)r��z1/1/2000r7��periods)r�frame�table��formatz3incompatible kind in col [integer - datetime64[ns]]rT)r?�append)	rr
rr(�re�escaper)r*r+)r-�df1�df2r/r0s     r1�$test_table_index_incompatible_dtypesrE3s���
�S�)�$�
%�C�
�S�)�$�J�z�1�,M�
N�C�	�J�	'�A�5�
�	�	�'�3�w�	�/��i�i�M�N��
�]�]�9�C�
0�	A��I�I�g�s�7�4�I�@�	A�A�A�	A�	A��A�A�s$�AB/�<B#�B/�#B,	�(B/�/B8c
��t|�5}dtjddd�fg}|D]�\}}tdt	j
d�j
d�zttd�t�	�ttd
�D�cgc]}d|����	c}t�	���}|||<tjd
|�d��}tjt|��5|j!d|��|�ddd���	ddd�tdt	j
d�j
d�zttd�t�	�ttd
�D�cgc]}d|����	c}t�	���}d|d<d|d<tjddd�|d<|j#�}t|�5}tjd�}tjt|��5|j!d|�ddd�ddd�ycc}w#1swY���xYw#1swY��$xYwcc}w#1swY�6xYw#1swYyxYw)N�datei�r5r6rrrrrrrr�[z&] is not implemented as a table columnr�df1_�foo�obj1�bar�obj2�	datetime1zjCannot serialize the column [datetime1]
because its data contents are not [string] but [date] object dtype�df_unimplemented)r�datetimerGrr"r#r$rr%r&r'rArBr)r*r+r@�_consolidate)r-r/�dtypes�n�fr.rr0s        r1�'test_unimplemented_dtypes_table_columnsrU>s��	�J�	'�
-�5��8�=�=��q�!�4�5�6���		-�D�A�q���b�i�i��n�,�,�W�5�5��d�6�l�&�9��u�R�y�9�!�r�!��X�9��H��B�
�B�q�E��)�)�a��s�"H�I�J�C����y��4�
-����t�A�3�Z��,�
-�
-�		-�	
-� 
��b�i�i��n�$�$�W�-�-��d�6�l�&�1��u�R�y�1�!�r�!��X�1��@�
�B�
�B�v�J��B�v�J��m�m�D�!�Q�/�B�{�O�	���	�B�	�J�	'�1�5��i�i�
F�
���]�]�9�C�
0�	1��L�L�+�R�0�	1�
1�1��%:�
-�
-��
-�
-��&2�	1�	1��
1�1�sa�A9H�H
�AH�H�2
H�H,�81H=�)H1�<H=�
H�H�H�H)�1H:	�6H=�=Ic
��t|�5}ttjj	d�jd�t
td�t��tddd���	�}d
|d<d|j|jd
ddf<|jd|d��tjd�}tj t"|��5t%�ddd�tjd�}tj t&|��5|j)dd�ddd�d}tj t*|��5|j)dd�ddd�ddd�||z}ttjj	d�jd�td�tdd���	�}|j-|ddd��t/|dd��t/|dd��||z}ttjj	d�jd�td�tdd���	�}|j-|dd� �d!}tj t&|��5t/|dd��ddd�y#1swY���xYw#1swY��wxYw#1swY��LxYw#1swY��QxYw#1swYyxYw)"Nr6)�
rrrz
2000-01-01rW�B)r;�freqrrJ�stringrLrrrr=r>z:__init__() missing 1 required positional argument: 'where'rzWcannot process expression [df.index[3]], [2000-01-06 00:00:00] is not a valid conditionzdf.index[3]zinvalid syntaxzindex>�20130101r:�dfqT)�keyr?�data_columnsz0index>Timestamp('20130104') & columns=['A', 'B']r z
A>0 or C>0)r]r?aThe passed where expression: A>0 or C>0\n\s*contains an invalid variable reference\n\s*all of the variable references must be a reference to\n\s*an axis \(e.g. 'index' or 'columns'\), or a data_column\n\s*The currently defined references are: index,columns\n)rrr"�random�default_rng�standard_normalrr%r&r
�locrr(rArBr)r*r+r
�
ValueErrorr,�SyntaxError�to_hdfr)�tmp_pathr-r/rr0�pathr\s       r1�test_invalid_termsrhcse��	�J�	'�)�5�
��I�I�!�!�!�$�4�4�W�=��$�v�,�f�5��\�2�C�@�
��
��8��*/����r�x�x��!�}�h�&�'�
�	�	�$��7�	�+��i�i�T�U��
�]�]�9�C�
0�	��F�	��i�i�
=�
���]�]�:�S�
1�	.��L�L��}�-�	.���
�]�]�;�c�
2�	)��L�L��x�(�	)�3)�:�j� �D�
�
�	�	���a� �0�0��9��V����R�0��C�
�J�J�t��w�T�J�B�
�T�5� R�S��T�5��-��j� �D�
�
�	�	���a� �0�0��9��V����R�0��C�
�J�J�t��w�J�/�	A��
���z��	-�2���u�L�1�2�2�Y	�	��	.�	.��	)�	)��3)�)��r2�2�s`�CJ7�J�8J7�J�(%J7�
J*� J7�8K�J	�J7�J'	�"J7�*J4	�/J7�7K�K
c�v�ttjjd�j	d��}tdtjjd�j	d�i�}tdtjjd�j	d�i�}tdtjjd�j	d�i�}tddt
ftjjd�j	d�i�}t
|�5}d}|j||�||||fD]M}tjd	�}	tjt|	�
�5|j||�ddd��O	ddd�y#1swY�cxYw#1swYyxYw)Nr6)rWr5r4rW�r5r6)�1r6rk�df_diff_valerrorz?cannot match existing table structure for [0] on appending datar)
rr"r_r`rar&rr@rArBr)r*rc)
r-rrD�df3�df4�df5r/�name�dr0s
          r1�7test_append_with_diff_col_name_types_raises_value_errorrr�sj��	�2�9�9�(�(��+�;�;�G�D�	E�B�
�S�"�)�)�/�/��2�B�B�2�F�G�
H�C�
�V�R�Y�Y�2�2�1�5�E�E�b�I�J�
K�C�
�X�r�y�y�4�4�Q�7�G�G��K�L�
M�C�
�c�1�f�%�r�y�y�'<�'<�Q�'?�'O�'O�PR�'S�T�
U�C�	�J�	'�	&�5�!��
���T�2���s�C��%�	&�A��)�)�Q��C����z��5�
&����T�1�%�
&�
&�		&�		&�	&�
&�
&��	&�	&�s%�.AF/�<F#�
F/�#F,�(F/�/F8c�|�ttjjd�jd�t	d�t	d���}tj|�5}d}tjt|��5|j|dd	�
�ddd�ddd�y#1swY�xYw#1swYyxYw)Nr6�rr8�abcd�ABCDE�rrz)complib only supports \[.*\] compression.rr�foolib)r]�complib)rr"r_r`r%�tm�ensure_cleanr)r*rcre)r-rrgr0s    r1�test_invalid_complibr|�s���	�
�	�	���a� �'�'��/��6�l��W�
�
�B�

����	$�8��:��
�]�]�:�S�
1�	8��I�I�d��h�I�7�	8�8�8�	8�	8��8�8�s$�"B2�B&�B2�&B/	�+B2�2B;�idx�2019�Dr7�UTC)rYr;�tz�abcc���tj||g�}td|dg��}||z}tjt
d��5|j
|d��ddd�y#1swYyxYw)Nrr4rwzSaving a MultiIndexrr�r])r�from_arraysrr)r*�NotImplementedErrorre)r}rfr-�mirrgs      r1�&test_to_hdf_multiindex_extension_dtyper��sg��
�	�	��c�
�	+�B�	�1�B���	.�B��j� �D�	���*�2G�	H�"�
�	�	�$�D�	�!�"�"�"�s�A$�$A-c��|ddd�}d}tjt|��5t|�ddd�y#1swYyxYw)N�io�dataz"legacy_hdf/incompatible_dataset.h5z_Dataset\(s\) incompatible with Pandas data types, not table, or no datasets found in HDF5 file.r)r)r*rcr)�datapath�	data_path�messages   r1�test_unsuppored_hdf_file_errorr��sH����v�'K�L�I�	8��

���z��	1��������s	�=�Ac��ttjjd�jd�t	d�t	d���}||z}d}tjt|��5t|d�ddd�|j|d	�
�t|d��}|j�d
}tjt|��5t|d	�ddd�y#1swY�lxYw#1swYyxYw)Nr6rtrurvrwzFile [\S]* does not existrr]rr��r)�modez&The HDFStore must be open for reading.)rr"r_r`r%r)r*�OSErrorrrer�close)r-rfrrgr0r/s      r1�test_read_hdf_errorsr��s���	�
�	�	���a� �'�'��/��6�l��W�
�
�B��j� �D�
&�C�	���w�c�	*����u����I�I�d��I���T��$�E�	�K�K�M�
2�C�	���w�c�	*�������������s�/
C'�
C3�'C0�3C<c��d}tjt|��5tt	d�d�ddd�y#1swYyxYw)Nz5Support for generic buffers has not been implemented.r�r)r)r*r�rr)r0s r1�#test_read_hdf_generic_buffer_errorsr��s9��
A�C�	���*�#�	6�%�����t�$�%�%�%�s	�=�A�bad_versionrj)r5�12�123c��d}tjt|��5td|��ddd�y#1swYyxYw)Nz5Version is incorrect, expected sequence of 3 integersr�values_block_0)�version)r)r*rcr)r�r0s  r1�)test_maybe_adjust_name_bad_version_raisesr��s9��
A�C�	���z��	-�B��+�[�A�B�B�B�s�5�>)&rPr�rrA�numpyr"r)�pandasrrrrrr	rzr
r�pandas.tests.io.pytables.commonr�pandas.io.pytablesr
r�mark�
single_cpu�
pytestmarkr2rErUrhrrr|�parametrizer%r�r�r�r�r��r�r1�<module>r�s�����	��
�	�	�	�?��
�[�[�
#�
#�
�6�.A�"1�J;2�|&�&	8������	��6��Q�5�9���e��%���"��"�	��*%���������r�4��(G�H�B�I�Br�

Youez - 2016 - github.com/yon3zu
LinuXploit