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/series/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pandas/tests/series/__pycache__/test_constructors.cpython-312.pyc
�

0	�gM�
���ddlmZddlmZddlmZmZddlmZddlZ	ddlm
Z
ddlZddlm
Z
mZddlmZdd	lmZddlmcmZdd
lmZddlZddlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ddl,m-Z.ddl/m0Z0m1Z1m2Z2dd
l3m4Z4Gd�d�Z5Gd�d�Z6Gd�d�Z7d�Z8ejrjudddie	jvdgge	jx��fddie	jvdgge=��fddie	jvdgge	jx��fg�d��Z>d�Z?ejrjudde@d�dgde@d�dgg�d ��ZAy)!�)�OrderedDict)�Iterator)�datetime�	timedelta)�tzoffsetN)�ma)�iNaT�lib)�np_version_gt2)�IntCastingNaNError)�CategoricalDtype)�Categorical�	DataFrame�
DatetimeIndex�DatetimeTZDtype�Index�Interval�
IntervalIndex�
MultiIndex�NaT�Period�
RangeIndex�Series�	Timestamp�
date_range�isna�period_range�timedelta_range)�IntegerArray�
IntervalArray�period_array)�
NumpyBlockc�F�eZdZd�Zd�Zd�Zd�Zejjdd�d�d�d	�d
�d�d�d
�d�d�d�g�ejjddgg�d���Z
d�Zd�Zd�Z
d�Zd�Zd�Zejjdeeeg�d��Zejjdej,ed�g�d��Zejjdgd ��ejjd!deg�g�d"���Zd#�Zd$�Zejjd%gd&��d'��Zd(�Zd)�Zd*�Z d+�Z!d,�Z"d-�Z#d.�Z$ejjdgd/��d0��Z%ejjd1d2d3gd4d5gee&d6d3d7�8��ee&d6d3d7d9�:��e'd;d<�=�gg�d>��Z(d?�Z)d@�Z*dA�Z+dB�Z,dC�Z-dD�Z.dE�Z/dF�Z0dG�Z1dH�Z2dI�Z3dJ�Z4dK�Z5dL�Z6dM�Z7dN�Z8dO�Z9ejjdPgdQ�dQee:dR��e;gdS��dT�e:dR�D�dU�e:dR�D�g�dV��Z<dW�Z=dX�Z>dY�Z?dZ�Z@d[�ZAeBj�ejjd!e&d\dRd9�]�e&d\dR�^�eDd_dR�^�eEd`dRda�8�eedb��egdQ��eFd;dR�gdc��d�de���ZGdf�ZHdg�ZIdh�ZJdi�ZKdj�ZLejjdkej�d2gej��l�ej�d2gej��l�ej�d2gej��l�ej�d2�gej�d2�gej�d2�gg�dm��ZQdn�ZRdo�ZSdp�ZTdq�ZUdr�ZVds�ZWdt�ZXdu�ZYdv�ZZdw�Z[dx�Z\dy�Z]dz�Z^d{�Z_d|�Z`d}�Zad~�Zbd�Zcd��Zdd��Zed��Zfd��Zgd��Zhd��Zid��Zjd��Zkd��Zlejjd�ej�ej�g�ejjd�d�d�g�ejjd�gd���d�����Zoejjd�d�epej,dg�d���Zqd��Zrejjd�esetg�d���Zuejjd�eej�gd�d�g�d�d���Zvejjd�eej�gd�d�g�d�d���Zwd��Zxejjd�eej�gd�d�g�d�d���Zyejj�d����d���Z{d��Z|d��Z}d��Z~d��Zd��Z�d��Z�ejjd�d3ej,ded�g�d���Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�ej�jd��d���Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�ejjd!e&d�d��^�eDd_d��^�eEd�d�da�8�gd���d�d���Z�ejjd!e&d�d��^�eDd_d��^�eEd�d�da�8�gd���d�d���Z�ejjde�j,e�j.g�d���Z�ejjd�gd���ejjd�d�d�g�d„��Z�ejjdgdâ�dĄ�Z�dńZ�dƄZ�ejjd�d�d�g�dʄ�Z�d˄Z�d̄Z�ejjdke�j,dͫe�j,dΫgd�d�gg�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�ejj�d߬��d��Z�ejj�d߬��d��Z�ej�jd�ejjd�e�e�ee�j�g�d���Z�d�Z�d�Z�ejjd�d2d�g�d��Z�ejjd�d2d�g�d��Z�d�Z�d�Z�d�Z�d�Z�ejjd�dej,e��j|g�d��Z�d�Z�d�Z�d�Z�d�Z�d��Z�d��Z�y)��TestSeriesConstructorsc���tjd�}||d��}||jd��}tj||�|t|�d��}tj||�y)N�
�M8[s]��dtype)�np�arange�astype�tm�assert_equal�list)�self�index_or_series�values�res�expecteds     �GC:\Python312\Lib\site-packages\pandas/tests/series/test_constructors.py�'test_from_ints_with_non_nano_dt64_dtypez>TestSeriesConstructors.test_from_ints_with_non_nano_dt64_dtype5sZ�����2����f�G�4��"�6�=�=��#9�:��
����X�&��d�6�l�'�:��
����X�&�c��tdgd��}|j�j�sJ�|jdk(sJ�y)Nzinterval[datetime64[ns]]r(zinterval[datetime64[ns], right])rr�allr)�r0�sers  r5�1test_from_na_value_and_interval_of_datetime_dtypezHTestSeriesConstructors.test_from_na_value_and_interval_of_datetime_dtype?s:���d�V�#=�>���x�x�z�~�~�����y�y�=�=�=�=r7c�&�tddd�}|j�|j�g}t|�}t|t��}tj||�t|�}t|t��}tj||�y)Ni��r()	r�
to_pydatetime�dater�objectr-�assert_series_equalr�assert_index_equal)r0�ts�valsr;r4�idxs      r5�!test_infer_with_date_and_datetimez8TestSeriesConstructors.test_infer_with_date_and_datetimeEsu���t�Q��
"��� � �"�B�G�G�I�.���T�l���$�f�-��
���s�H�-��D�k����V�,��
���c�8�,r7c�4�dg}d}tjt|��5t|d��ddd�tjt|��5tt	j
|t��d��ddd�y#1swY�TxYw#1swYyxYw)N�aazD^Unknown datetime string format, unable to parse: aa, at position 0$��match�datetime64[ns]r()�pytest�raises�
ValueErrorrr*�arrayrA)r0rE�msgs   r5�'test_unparsable_strings_with_dt64_dtypez>TestSeriesConstructors.test_unparsable_strings_with_dt64_dtypeSs����v��T��
�]�]�:�S�
1�	1��4�/�0�	1��]�]�:�S�
1�	I��2�8�8�D��/�7G�H�	I�	I�	1�	1��	I�	I�s�B�'B�B�B�constructorc��t|��S�N��index�r�rFs r5�<lambda>zTestSeriesConstructors.<lambda>ds���c�*�r7c��td|��SrUrXrYs r5rZzTestSeriesConstructors.<lambda>es
����C�0�r7c��ti|��SrUrXrYs r5rZzTestSeriesConstructors.<lambda>f�
����#�.�r7c��td|��S)N�rVrXrYs r5rZzTestSeriesConstructors.<lambda>gr]r7c��tg|��SrUrXrYs r5rZzTestSeriesConstructors.<lambda>hr]r7c�*�td�dD�|��S)Nc3� K�|]}|���y�w�Nr_��.0�_s  r5�	<genexpr>z2TestSeriesConstructors.<lambda>.<locals>.<genexpr>is�����q�����r_rVrXrYs r5rZzTestSeriesConstructors.<lambda>is����B��s�;�r7c��td|��S�N��datarWrXrYs r5rZzTestSeriesConstructors.<lambda>js
���T��5�r7c��ti|��SrjrXrYs r5rZzTestSeriesConstructors.<lambda>k�
���R�s�3�r7c��td|��S)Nr_rkrXrYs r5rZzTestSeriesConstructors.<lambda>lrnr7c��tg|��SrjrXrYs r5rZzTestSeriesConstructors.<lambda>mrnr7c�*�td�dD�|��S)Nc3� K�|]}|���y�wrcr_rds  r5rgz2TestSeriesConstructors.<lambda>.<locals>.<genexpr>ns����_�A�a�_�rhr_rkrXrYs r5rZzTestSeriesConstructors.<lambda>ns���_��_�C�@�r7�empty_indexNc��t|��}||�}|jtk(sJ�t|j�dk(sJ�tj||d��y)NrVrT��check_index_type)rr)rA�lenrWr-rB)r0rSrsr4�results     r5�test_empty_constructorz-TestSeriesConstructors.test_empty_constructor]sS��.��,���[�)���|�|�v�%�%�%��6�<�<� �A�%�%�%�
���v�x�$�Gr7c��d}tdtg}|D]4}tjt|��5tgd|��ddd��6y#1swY�AxYw)Nznot understoodrrJ�time)�namer))rr/rMrN�	TypeErrorr)r0rQ�invalid_listr)s    r5�test_invalid_dtypez)TestSeriesConstructors.test_invalid_dtype{sV����!�;��5��!�	5�E����y��4�
5��r��e�4�
5�
5�	5�
5�
5�s�A
�
A	c���tjddg�}tjddg|��}tjt
d��5t
|dd	g�
�ddd�y#1swYyxYw)N)�a�i8)�b�f4)r>g�������?)�i�r(zUse DataFrame insteadrJ�A�BrV)r*r)rPrMrNrOr)r0�c_dtype�cdt_arrs   r5�test_invalid_compound_dtypez2TestSeriesConstructors.test_invalid_compound_dtype�s\���(�(�K��5�6���(�(�H�j�1��A��
�]�]�:�-D�
E�	.��7�3��*�-�	.�	.�	.�s�A%�%A.c�>�td�}t|t�rJ�y)Ng�?)r�
isinstance�float)r0�scalars  r5�test_scalar_conversionz-TestSeriesConstructors.test_scalar_conversion�s�������f�e�,�,�,�,r7c��|\}}t|td���}t|gdz|��}|j|k(sJ�tj||�y)N�rVr()r�ranger)r-rB)r0�ea_scalar_and_dtype�	ea_scalar�ea_dtyper;r4s      r5�test_scalar_extension_dtypez2TestSeriesConstructors.test_scalar_extension_dtype�sR��2��	�8��Y�e�A�h�/���9�+��/��:���y�y�H�$�$�$�
���s�H�-r7c�T�t�}|jjsJ�t|�}|jjsJ�tj|j|j�t|j�t|j�k(sJ�tdtjgddg��}|s|jtjk(sJ�	t
j|d�sJ�|jjrJ�t�jjrJ�tjtd��5ttjjd�j!d�t
j"d	���ddd�d
|_t|�j$}d
}||k(sJ�t'j(ddgd	dgg�}d}	tjt*|	��5t|�ddd�y#1swY�{xYw#1swYyxYw)
N�hellorr>rVzAData must be 1-dimensional, got ndarray of shape \(3, 3\) insteadrJ�)r�r�r�r�z8initializing a Series from a MultiIndex is not supported)rrW�
_is_all_datesr-rC�idr*�nanr)�object_�isnanrMrNrO�random�default_rng�standard_normalr+r|r�from_arrays�NotImplementedError)
r0�datetime_series�using_infer_string�empty_series�derived�mixed�rs�xp�mrQs
          r5�test_constructorz'TestSeriesConstructors.test_constructor�s����x���$�$�2�2�2�2���)���}�}�*�*�*�*�
���g�m�m�_�-B�-B�C��/�'�'�(�B�w�}�}�,=�=�=�=������(��A��7��0B�u�{�{�b�j�j�(�P�P���x�x��a��!�!�!��%�%�3�3�3�3��8�>�>�/�/�/�/��]�]��V�
�	Y�
�2�9�9�(�(��+�;�;�F�C�2�9�9�UV�<�X�		Y���
�
�E�]�
�
��
���R�x��x�
�"�"�Q��F�Q��F�#3�4��H��
�]�]�.�c�
:�	��1�I�	�	�	Y�	Y��	�	�s�A
H�=H�H�H'c��tddgddgddgggd���}tjtd	�
�5t	gd�|��ddd�y#1swYyxYw)Nr>r�r�r���)r�r��	rVz Index data must be 1-dimensionalrJ�r>r�r�)rrMrNrOr)r0�dfs  r5�'test_constructor_index_ndim_gt_1_raisesz>TestSeriesConstructors.test_constructor_index_ndim_gt_1_raises�sO��
��A���A���A��/�y�
A��
�]�]�:�-O�
P�	(��9�B�'�	(�	(�	(�s�A
�
A�input_classc�V�t�}t|��}tj||d��td��}t|�d��}tj||d��td��}t|�d��}tj||d��|tu�rtt	d���}t|�t	d���}tj||�tt
jt	d���}t|�t	d�d��}tj||�td	tt	d
���}|rtd	t	d
�t��}ntd	t	d
���}tj||�yy)NFru�float64r(�categoryr&rV�rWr)�r��r)rW)	rr-rBr/r�r*r��strrA)r0r�r��empty�empty2s     r5�test_constructor_emptyz-TestSeriesConstructors.test_constructor_empty�sA�������
�&��	���u�f�u�E��Y�'����
�Y�7��
���u�f�u�E��Z�(����
�Z�8��
���u�f�u�E��d�"���r��+�E��K�M��r��;�F��"�"�5�&�1��2�6�6��r��3�E��K�M��r��)�L�F��"�"�5�&�1��2�S��a��9�E�!���%��(�&�A����%��(�3���"�"�5�&�1�##r7�	input_argr�c��tdtd���}t|td���}tj||d��y)Nr�r&r�rVFru�rr�r-rB)r0r�r�r�s    r5�test_constructor_nanz+TestSeriesConstructors.test_constructor_nan�s4���Y�e�B�i�8���	��r��3��
���u�f�u�Er7r))�f8r��M8[ns]�m8[ns]r�rAzdatetime64[ns, UTC]rWc�`�t||��}|j|k(sJ�t|�dk(sJ�y)Nr�r)rr)rw)r0r)rWrxs    r5�test_constructor_dtype_onlyz2TestSeriesConstructors.test_constructor_dtype_only�s4���e�5�1���|�|�u�$�$�$��6�{�a���r7c�b�tgd���}|jj�gd�k(sJ�y)N�r�r��crV)rrW�tolist�r0rxs  r5�$test_constructor_no_data_index_orderz;TestSeriesConstructors.test_constructor_no_data_index_order�s'���o�.���|�|�"�"�$��7�7�7r7c�p�tdgt��}tj|jd�sJ�y�Nr>r�r)rr�r*r��ilocr�s  r5�$test_constructor_no_data_string_typez;TestSeriesConstructors.test_constructor_no_data_string_types*���q�c��-���x�x����A��'�'�'r7�item)�entryuѐ�
c�d�t|dgt��}|jdt|�k(sJ�yr�)rr�r�)r0r�rxs   r5�+test_constructor_string_element_string_typezBTestSeriesConstructors.test_constructor_string_element_string_types.����Q�C�s�3���{�{�1�~��T��*�*�*r7c�,�tddg|��}|j�}tddg�}tj||�|jd�J�tdt
jg|��}tj|jd�sJ�y)N�xr(FTr>)rrr-rBr�r*r�r�)r0�string_dtyper;rxr4s     r5�$test_constructor_dtype_str_na_valuesz;TestSeriesConstructors.test_constructor_dtype_str_na_valuess}���c�4�[��5��������5�$�-�(��
���v�x�0��x�x��{�"�"�"��c�2�6�6�]�,�7���x�x������$�$�$r7c��gd�}t|�}tgd�|��}t||��}tj||j	��y)N)�dr�r�r�)r�����r�rV)�sortedrr-rB�
sort_index)r0�index1�index2�s1�s2s     r5�test_constructor_seriesz.TestSeriesConstructors.test_constructor_seriess>��%������
�M��
0��
�B�f�
%��
���r�2�=�=�?�3r7c��Gd�d�}tttd��d��}t|�d��}tj||�y)Nc��eZdZdefd�Zy)�>TestSeriesConstructors.test_constructor_iterable.<locals>.Iter�returnc3�6K�td�Ed{���y7��w)Nr&)r��r0s r5�__iter__zGTestSeriesConstructors.test_constructor_iterable.<locals>.Iter.__iter__$s���� ��9�$�$�s���N)�__name__�
__module__�__qualname__rr�r_r7r5�Iterr�#s��
%�(�
%r7r�r&�int64r(�rr/r�r-rB)r0r�r4rxs    r5�test_constructor_iterablez0TestSeriesConstructors.test_constructor_iterable!s@��	%�	%��$�u�R�y�/��9�����g�.��
���v�x�0r7c��tttd��d��}ttd�d��}tj||�y)Nr&r�r(r��r0r4rxs   r5�test_constructor_sequencez0TestSeriesConstructors.test_constructor_sequence+s6���$�u�R�y�/��9����b�	��1��
���v�x�0r7c�^�tdg�}td�}tj||�y)N�abc�rr-rBr�s   r5�test_constructor_single_strz2TestSeriesConstructors.test_constructor_single_str1s&���5�'�?������
���v�x�0r7c��tgd�d��}gd�dtjgd�d��fD]'}t|gd���}tj||��)y)N�r>r�r�r�r(�rr>r�rV)rr*rPr-rB)r0r4�objrxs    r5�test_constructor_list_likez1TestSeriesConstructors.test_constructor_list_like7sM���)�7�3���y�"�(�(�9�G�*L�M�	5�C��C�y�1�F��"�"�6�8�4�	5r7c��tgd�gd���}|dk(}tgd�|��}tgd�gd���}tj||�y)Nr�)r�r�r�rVr�r�)FTFr�)r0r�rWrxr4s     r5�test_constructor_boolean_indexz5TestSeriesConstructors.test_constructor_boolean_index@s@��
�I�Y�
/���a����	��/���)�+?�@��
���v�x�0r7)�bool�int32r�r�c�V�ttgd��|��}|j|k(sJ�y)N)rr�r�r()rrr))r0r)�ss   r5�test_constructor_index_dtypez3TestSeriesConstructors.test_constructor_index_dtypeIs'��
�5��#�5�1���w�w�%���r7�
input_valsr>r��1�2z1/1/2011�h��periods�freq�
US/Eastern)r
r�tzrr�)�left�rightc�~�t||��}t|�j|�}tj||�y�Nr(�rr,r-rB)r0rr�rxr4s     r5�test_constructor_list_strz0TestSeriesConstructors.test_constructor_list_strPs5���
�,�7���*�%�,�,�\�:��
���v�x�0r7c���tddtjg|��}tddtjgt��}t	j
||�tj|d�sJ�y)N��?�@r(z1.0z2.0r�)rr*r�rAr-rBr�)r0r�rxr4s    r5�test_constructor_list_str_naz3TestSeriesConstructors.test_constructor_list_str_nabsV����c�2�6�6�*�,�?���5�%����0��?��
���v�x�0��x�x��q�	�"�"�"r7c�2�d�td�D�}t|�}ttd��}tj||�d�td�D�}t|tdd���}tdd�|_tj||�y)Nc3� K�|]}|���y�wrcr_�re�is  r5rgzDTestSeriesConstructors.test_constructor_generator.<locals>.<genexpr>i�����$�Q�q�$�rhr&c3� K�|]}|���y�wrcr_rs  r5rgzDTestSeriesConstructors.test_constructor_generator.<locals>.<genexpr>prrh�rV�r�rr-rBrW)r0�genrx�exps    r5�test_constructor_generatorz1TestSeriesConstructors.test_constructor_generatorhsv��$�%��)�$�������U�2�Y���
���v�s�+�%�%��)�$����5��R�=�1���"�b�M��	�
���v�s�+r7c�2�d�td�D�}t|�}ttd��}tj||�d�td�D�}t|tdd���}tdd�|_tj||�y)Nc3� K�|]}|���y�wrcr_�rer�s  r5rgz>TestSeriesConstructors.test_constructor_map.<locals>.<genexpr>w�����"�1�Q�"�rhr&c3� K�|]}|���y�wrcr_r(s  r5rgz>TestSeriesConstructors.test_constructor_map.<locals>.<genexpr>~r)rhr!rVr")r0r�rxr$s    r5�test_constructor_mapz+TestSeriesConstructors.test_constructor_mapusv��"��b�	�"�������U�2�Y���
���v�s�+�
#��b�	�"�����r�2��/���"�b�M��	�
���v�s�+r7c���tgd�gd��}t|�}tj|j|�ttgd��d��}tgd�d��}tj
||�y)N)rr>r�rr>r��r�r�r�r�r�r()rrr-�assert_categorical_equalr2rB)r0�catr3rxr4s     r5�test_constructor_categoricalz3TestSeriesConstructors.test_constructor_categorical�s[���,�o�>���S�k��
�#�#�C�J�J��4���I�.�g�>���)�7�3��
���v�x�0r7c�l�ttgd��d��}t|jt�sJ�y�Nr�r�r()rrr�r)r
r:s  r5�*test_construct_from_categorical_with_dtypezATestSeriesConstructors.test_construct_from_categorical_with_dtype�s(���[��+�:�>���#�)�)�%5�6�6�6r7c�Z�tgd�d��}t|jt�sJ�yr2)rr�r)r
r:s  r5�,test_construct_intlist_values_category_dtypezCTestSeriesConstructors.test_construct_intlist_values_category_dtype�s#���Y�j�1���#�)�)�%5�6�6�6r7c���tgd��}t|d��}|jdk(sJ�t|�t|�k(sJ�t	d|i�}|d}tj||�|jdd�df}tj||�t|�t|�k(sJ�t	d|i�}|d}tj||�t|�t|�k(sJ�t	||dd��}|d}|d}tj||�tj||d	�
�|jdk(sJ�t|�t|�k(sJ�y)N)r�r�r�r�r�r�r�r�r��r|r�rr>�r�r��Cr�F)�check_names)	rrr)rwrr-rBr�r|)r0�factorrr�rx�result1�result2s       r5�*test_constructor_categorical_with_coercionzATestSeriesConstructors.test_constructor_categorical_with_coercion�sM���E�F���6��$���w�w�*�$�$�$��1�v��V��$�$�$���V�}�
%���C���
���v�q�)�����A����
���v�q�)��2�w�#�f�+�%�%�%�
��Q�x�
 ���C���
���v�q�)��2�w�#�f�+�%�%�%��Q�Q�Q�/�
0���S�'���S�'��
���w��*�
���w��u�=��|�|�s�"�"�"��2�w�#�f�+�%�%�%r7c�B�tddgddgddggddg��}t|j�|d<|jdj}|jjd}||k(sJ�|jd}||k(sJ�|jjd}||k(sJ�y)	Nr>zJohn P. Doer�z	Jane Dove�	person_id�person_name)�columnsr)rrrAr��loc)r0r�r4rxs    r5�+test_constructor_categorical_with_coercion2zBTestSeriesConstructors.test_constructor_categorical_with_coercion2�s������
�!�[�!1�A�}�3E�F� �-�0�
��'�q�}�}�5��-���6�6�!�9�(�(�����#�#�A�&����!�!�!����q�!����!�!�!����"�"�1�%����!�!�!r7c��tgd��}t|d��}tgd�d��}tj||�y)Nr-r�r(r�)r0�seriesrxr4s    r5�&test_constructor_series_to_categoricalz=TestSeriesConstructors.test_constructor_series_to_categorical�s4����(����j�1���/��<��
���v�x�0r7c��tddgtgd�d����}t|jt�sJ�t	j
|jjtgd���|jjsJ�tddgtddg���}t|jt�sJ�t	j
|jjtddg��|jjdusJ�tddd	gtddgd���
�}tddgdd	gtddgd���
�}t	j||�y)Nr�r�r-T)�orderedr(Frr>r�)rr
r�r)r-rCr/�
categoriesrrIrB�r0rxr4s   r5�"test_constructor_categorical_dtypez9TestSeriesConstructors.test_constructor_categorical_dtype�s-���
�#�J�.���M�
���&�,�,�(8�9�9�9�
���f�j�j�3�3�U�?�5K�L��z�z�!�!�!�!���c�
�*:�C��:�*F�G���&�,�,�(8�9�9�9�
���f�j�j�3�3�U�C��:�5F�G��z�z�!�!�U�*�*�*����1�v�%5�s�C�j�$�%O�
���
�#�J�q�!�f�,<�c�3�Z�QU�,V�
��	���v�x�0r7c��ttd�d��}ttd�|��}ttd�|��}t|d��}t	j
||�t|d��}t	j
||�y)N�dabcT)rJrI�abcabcr(r�)r
r/rrr-rB)r0�cdtr4r/rxs     r5�#test_constructor_categorical_stringz:TestSeriesConstructors.test_constructor_categorical_string�sn���$�v�,��E���$�x�.��4���$�x�.��4����:�.��
���v�x�0���j�1��
���v�x�0r7c��tgd��}t|d��}|j|usJ�|jjgd��}t	j
gd�tj��}t	j
gd�tj��}tj|j�|�tj|j�|�d|d<t	j
gd	�tj��}tj|j�|�tj|j�|�tgd��}t|d
��}|j|usJ�|jjgd��}|j|usJ�t	j
gd�tj��}tj|j�|�d|d<t	j
gd	�tj��}tj|j�|�y)N)r�r�r�r�T)�copyr�)r>r�r�r>r(r�r)r�r�r�r>F)rrr/�rename_categoriesr*rPr�r�r-�assert_numpy_array_equal�	__array__r2)r0r/r�exp_s�exp_cat�exp_s2s      r5�!test_categorical_sideeffects_freez8TestSeriesConstructors.test_categorical_sideeffects_free�s����.�/���3�T�"���u�u�C����
�E�E�#�#�I�.������R�X�X�6���(�(�/�r�z�z�B��
�#�#�A�K�K�M�5�9�
�#�#�C�M�M�O�W�=���!�����,�b�h�h�7��
�#�#�A�K�K�M�6�:�
�#�#�C�M�M�O�W�=��.�/���3�U�#���x�x�3����
�E�E�#�#�I�.���x�x�s�"�"�"�����R�X�X�6��
�#�#�A�K�K�M�5�9���!�����,�b�h�h�7��
�#�#�A�K�K�M�6�:r7c��tgd�tddg���}ttddtjgddg���}tj||�y)Nr-r�r�r()rJ)rr
rr*r�r-rB)r0rrs   r5�test_unordered_compare_equalz3TestSeriesConstructors.test_unordered_compare_equalsH���o�-=�s�C�j�-I�J���{�C��b�f�f�#5�3��*�M�N��
���t�U�+r7c	�:	�tjdt��}t|�}ttj
tj
tj
g�}t
j||�d|d<d|d<gd�}t||��}tdtj
dg|��}t
j||�d	|d
<t||��}tgd�|��}t
j||�tjdt��}t|�}ttj
tj
tj
gt��}t
j||�d|d<d|d<gd�}t||��}tdtj
dg|t��}t
j||�d
|d
<t||��}tgd
�|t��}tjtd��5t
j||�ddd�tjdt��}t|�}ttj
tj
tj
gt��}t
j||�d|d<d|d<gd�}t||��}tdtj
dg|t��}t
j||�d|d
<t||��}tgd�|t��}tjtd��5t
j||�ddd�tjdd��}t|�}ttttgd��}t
j||�tdd
d
�|d<tdd
d�|d<gd�}t||��}ttdd
d
�ttdd
d�g|d��}t
j||�tdd
d�|d
<t||��}ttdd
d
�tdd
d�tdd
d�g|d��}t
j||�y#1swY��dxYw#1swY��CxYw)N�r�r(�rrr�r-rVrr>)r_rrr�r�zSeries classes are differentrJTF�TTFr���r�)r�
masked_allr�rr*r�r-rB�intrMrN�AssertionErrorrrAr	r)r0rlrxr4rWs     r5�test_constructor_maskedarrayz3TestSeriesConstructors.test_constructor_maskedarrays����}�}�T��/�������2�6�6�2�6�6�2�6�6�2�3��
���v�x�0���Q����Q������E�*���3�����,�E�:��
���v�x�0���Q����E�*���/��7��
���v�x�0��}�}�T��-�������2�6�6�2�6�6�2�6�6�2�%�@��
���v�x�0���Q����Q������E�*���1�b�f�f�a�.��U�C��
���v�x�0���Q����E�*���)�5��<��
�]�]�>�1O�
P�	5�
�"�"�6�8�4�	5�
�}�}�T��.�������2�6�6�2�6�6�2�6�6�2�&�A��
���v�x�0���Q����Q������E�*���4�����/�u�F�K��
���v�x�0���Q����E�*���-�U�$�G��
�]�]�>�1O�
P�	5�
�"�"�6�8�4�	5�
�}�}�T��2�������4��t�,�H�=��
���v�x�0��4��A�&��Q���4��A�&��Q������E�*���
�d�A�q�
!�4��$��1�)=�>���
��
	���v�x�0��4��A�&��Q����E�*���
�d�A�q�
!�8�D�!�Q�#7��$��1�9M�N���
��
	���v�x�0�a	5�	5��(	5�	5�s�
R�8R�R
�Rc��tjdt��j�}t	|�}t	t
jt
jt
jg�}tj||�y)Nr^r()	rrbr��harden_maskrr*r�r-rB�r0rlrxr4s    r5�%test_constructor_maskedarray_hardenedz<TestSeriesConstructors.test_constructor_maskedarray_hardenedksQ���}�}�T��/�;�;�=�������2�6�6�2�6�6�2�6�6�2�3��
���v�x�0r7c���tddd��}|D�cic]}|d��}}t||��}|r|jj|�sJ�y|j|usJ�ycc}w)N�20090415�20090519r��rr>rV)rrrW�is_)r0�using_copy_on_write�rng�krlrxs      r5�#test_series_ctor_plus_datetimeindexz:TestSeriesConstructors.test_series_ctor_plus_datetimeindexrse����Z�c�:��!�"���1��"��"���C�(����<�<�#�#�C�(�(�(��<�<�3�&�&�&��
#s�
Ac��tgd��}tj|jt	td��d��y)Nr�r�T)�exact)rr-rCrWrr��r0rs  r5�test_constructor_default_indexz5TestSeriesConstructors.test_constructor_default_index|s*���9���
���a�g�g�u�U�1�X��d�Cr7�inputr�r�)r�r�r�c#� K�|]}|���y�wrcr_rs  r5rgz TestSeriesConstructors.<genexpr>������!�1�Q�!�rhc#� K�|]}|���y�wrcr_r(s  r5rgz TestSeriesConstructors.<genexpr>�ryrhc��d}tjt|��5t|t	j
d���ddd�y#1swYyxYw)Nz;Length of values \(3\) does not match length of index \(4\)rJr�rV)rMrNrOrr*r+)r0rwrQs   r5�test_constructor_index_mismatchz6TestSeriesConstructors.test_constructor_index_mismatch�s?��M��
�]�]�:�S�
1�	.��5��	�	�!��-�	.�	.�	.�s�!A�Ac���ttjd�tjd�d��}tdtjd�d��}t	j
||�y)N�dr�r�r�)rr*rPr+r-rBrKs   r5�test_constructor_numpy_scalarz4TestSeriesConstructors.test_constructor_numpy_scalar�sH�������
�R�Y�Y�q�\��I���#�R�Y�Y�q�\��A��
���v�x�0r7c��d}tjt|��5tdggd���ddd�y#1swYyxYw)Nz;Length of values \(1\) does not match length of index \(3\)rJ�foor-rV)rMrNrOr�r0rQs  r5�test_constructor_broadcast_listz6TestSeriesConstructors.test_constructor_broadcast_list�s9��M��
�]�]�:�S�
1�	3��E�7�/�2�	3�	3�	3�s	�8�Ac��ttd�tdd����}||g}t|ddg��}t	|t�sJ�y)Nr��
2020-01-01�r
rVrr>)rr�rrr�)r0r��objsrs    r5�test_constructor_cornerz.TestSeriesConstructors.test_constructor_corner�sB��
�u�Q�x�z�,��'J�
K���B�x���4��1�v�&���!�V�$�$�$r7c�X�ttjgd��d��}|jtjd�k(sJ�d}t	j
t|��5ttjddtjg�dd��ddd�y#1swYyxYw)	N)rrg @r�r(�9Cannot convert non-finite values \(NA or inf\) to integerrJrT�rSr))rr*rPr)rMrNrr�)r0rrQs   r5�test_constructor_sanitizez0TestSeriesConstructors.test_constructor_sanitize�s~���2�8�8�O�,�D�9���w�w�"�(�(�4�.�(�(�(�J��
�]�]�-�S�
9�	H��2�8�8�S�#�r�v�v�.�/�d�$�G�	H�	H�	H�s�$3B � B)c��dgtjdg�fD]a}t|�}t|dt��}t	j
||�d|d<|j
|�rJ�|ddk(sJ�|ddk(r�aJ�y)NrTr�rr)r*rPrr�r-rB�equals)r0rlr��ys    r5�test_constructor_copyz,TestSeriesConstructors.test_constructor_copy�s����U�B�H�H�c�U�O�,�	�D��t��A��q�t�5�1�A�
�"�"�1�a�(��A�a�D��x�x��{�"�?��Q�4�3�;��;��Q�4�3�;��;�	r7�20170101�r
rr�z1 day�2012Q1�Qr�c�,�t|�jSrc��typer��r�s r5rZzTestSeriesConstructors.<lambda>����d�1�g�&�&�r7)�idsc�h�t|�}|jjdj|usJ�y�Nr)r�_mgr�blocksr2)r0rWrs   r5�test_constructor_limit_copiesz4TestSeriesConstructors.test_constructor_limit_copies�s0��"
�5�M���v�v�}�}�Q��&�&�e�3�3�3r7c���tgd��}|j�}t|�}|j|jusJ�gd�|_t	j
||�y)Nr�r-)rrSr�rWr-rB)r0r�s_origr�s    r5�test_constructor_shallow_copyz4TestSeriesConstructors.test_constructor_shallow_copy�sO��
�9��������
�A�Y���w�w�a�f�f�$�$�$�"���
���q�&�)r7c�z�tdtd���}|jtjk(sJ�tdtd�t
��}|jtjk(sJ�ttjdg���}ttdg���}tj||�y)Nr�rVr�)rr�r)r*r�rAr�rPrr-rB�r0rr4s   r5�test_constructor_pass_nonez1TestSeriesConstructors.test_constructor_pass_none�s����4�u�Q�x�(���w�w�"�*�*�$�$�$��4�u�Q�x�v�6���w�w�"�*�*�$�$�$�
����4�&�)�*����t�f�
�.��
���q�(�+r7c���ttjtjgtj��}|jtjk(sJ�tjttjtjg�|�tjttjtjtjg��|�tttg�}|jdk(sJ�tjtttg�|�tjttjttg��|�tjtttjg�|�tjttjttjg��|�tjttjtg�|�tjttjtjtg��|�y)Nr(rL)	rr*r�r�r)r-rBrPr)r0r$s  r5�test_constructor_pass_nan_natz4TestSeriesConstructors.test_constructor_pass_nan_nat�sd���b�f�f�b�f�f�%�R�Z�Z�8���y�y�B�J�J�&�&�&�
���v�r�v�v�r�v�v�&6�7��=�
���v�b�h�h�������/?�&@�A�3�G��c�3�Z� ���y�y�,�,�,�,�
���v�s�C�j�1�3�7�
���v�b�h�h��S�z�&:�;�S�A�
���v�s�B�F�F�m�4�c�:�
���v�b�h�h��R�V�V�}�&=�>��D�
���v�r�v�v�s�m�4�c�:�
���v�b�h�h�����}�&=�>��Dr7c��d}tjt|��5tgd�t��ddd�y#1swYyxYw)Nz!could not convert string to floatrJr-r()rMrNrOrr�r�s  r5�test_constructor_castz,TestSeriesConstructors.test_constructor_casts4��1��
�]�]�:�S�
1�	1��?�%�0�	1�	1�	1�s	�;�Ac��tr	d}t}nd}t}tj||��5tgd�d��ddd�tj||��5tgd�d��ddd�y#1swY�9xYw#1swYyxYw)NzCThe elements provided in the data cannot all be casted to the dtypez/Values are too large to be losslessly convertedrJ)r>��i2�int8r(�uint8)r�
OverflowErrorrOrMrNr)r0rQ�errs   r5�+test_constructor_signed_int_overflow_raiseszBTestSeriesConstructors.test_constructor_signed_int_overflow_raisess|���W�C��C�C�C��C�
�]�]�3�c�
*�	3��#�6�2�	3��]�]�3�c�
*�	4��#�7�3�	4�	4�	3�	3��	4�	4�s�A7�B�7B�Br2r(c�t�|d}t|�}|dj|jk(sJ�|d|k(sJ�yr�)rr))r0r2�valuerxs    r5�test_constructor_numpy_uintsz3TestSeriesConstructors.test_constructor_numpy_uintssB���q�	�������a�y���%�+�+�-�-�-��a�y�E�!�!�!r7c��trd|��}nd}tjt|��5t	dg|��ddd�y#1swYyxYw)NzDThe elements provided in the data cannot all be casted to the dtype z5Trying to coerce negative values to unsigned integersrJ���r()rrMrNr�r)r0�any_unsigned_int_numpy_dtyperQs   r5�(test_constructor_unsigned_dtype_overflowz?TestSeriesConstructors.test_constructor_unsigned_dtype_overflow(sS���.�.J�-K�M�
�
J�C�
�]�]�=��
4�	=��B�4�;�<�	=�	=�	=�s�A�Ac��tjjd�jd�}d}t	j
t|��5||d��ddd�t	j
t|��5|t|�d��ddd�tj|d<d}t	j
t|��5||d��ddd�t}|turt}d}t	j
||��5|t|�d��ddd�tjd	d
gd��}||jd��}||d��}tj||�|t|�d��}tj||�y#1swY��GxYw#1swY��xYw#1swY��xYw#1swY��xYw)Nr��(Trying to coerce float values to integerrJr�r(rr��#cannot convert float NaN to integerrrr�)r*r�r�r�rMrNrOr/r�rrrPr,r-r.)r0�frame_or_series�arrrQ�excr4r�s       r5�(test_constructor_floating_data_int_dtypez?TestSeriesConstructors.test_constructor_floating_data_int_dtype4sx���i�i�#�#�A�&�6�6�q�9��9��
�]�]�:�S�
1�	-��C�t�,�	-��]�]�:�S�
1�	3��D��I�T�2�	3�����A��K��
�]�]�-�S�
9�	-��C�t�,�	-�!���f�$��C�7�C�
�]�]�3�c�
*�	3��D��I�T�2�	3�
�h�h��S�z��3��"�3�:�:�d�#3�4���c��.��
����X�&��d�3�i�t�4��
����X�&�?	-�	-��	3�	3��	-�	-��	3�	3�s0�F�:F)�F6�G�F&�)F3�6F?�Gc�*�gd�}d}tjt|��5t||��ddd�tjt|��5tt	j
|�|��ddd�y#1swY�NxYw#1swYyxYw)N�r>r�g@r�rJr()rMrNrOrr*rP�r0�any_int_numpy_dtyperErQs    r5�"test_constructor_coerce_float_failz9TestSeriesConstructors.test_constructor_coerce_float_fail`sw��
��8��
�]�]�:�S�
1�	4��4�2�3�	4�
�]�]�:�S�
1�	>��2�8�8�D�>�)<�=�	>�	>�	4�	4��	>�	>�s�A=�!B	�=B�	Bc��tgd�|��}tgd��j|�}tj||�y)Nr�r(r)r0�float_numpy_dtyperr4s    r5�#test_constructor_coerce_float_validz:TestSeriesConstructors.test_constructor_coerce_float_validms5���;�&7�8���+�&�-�-�.?�@��
���q�(�+r7c�L�ddtjg}d}tjt|��5t||��ddd�d}tjt|��5ttj|�|��ddd�y#1swY�PxYw#1swYyxYw)Nr>r�r�rJr(r�)r*r�rMrNrOrrrPr�s    r5�3test_constructor_invalid_coerce_ints_with_float_nanzJTestSeriesConstructors.test_constructor_invalid_coerce_ints_with_float_nanrs����1�b�f�f�~��4��
�]�]�:�S�
1�	4��4�2�3�	4�J��
�]�]�-�S�
9�	>��2�8�8�D�>�)<�=�	>�	>�	4�	4��	>�	>�s�B�$!B�B�B#c���tgd��}t|tj��}|rtnd}t	j
|�5d|d<ddd�|r|ddk(sJ�y|ddk(sJ�y#1swY�!xYw)Nr�r(r�r>r�)rr*r��
FutureWarningr-�assert_produces_warning)r0ro�warn_copy_on_writerr��warns      r5�test_constructor_dtype_no_castz5TestSeriesConstructors.test_constructor_dtype_no_cast�st���9���
�A�R�X�X�
&�� 2�}���
�
'�
'��
-�	��B�q�E�	���Q�4�1�9��9��Q�4�1�9��9�	�	�s�A.�.A7c���ttd�dgt��}|jdtd�k(sJ�|jddk(sJ�|jtk(sJ�y)N�20130101�NOVr(rr>)rrrAr�r)rus  r5�"test_constructor_datelike_coercionz9TestSeriesConstructors.test_constructor_datelike_coercion�s]��
�I�j�)�5�1��@���v�v�a�y�I�j�1�1�1�1��v�v�a�y�E�!�!�!��w�w�&� � � r7c�\�dj�}dj�}dj�}tjdj��}t|||d�|��}|jd}|j
tk(sJ�|jd}|j
tk(sJ�y)	Nz216 3T19z	2T15 4H19z416 4T20z2016-01-22 2019-09-07)�wing1�wing2�matrV�3T19�216)�split�pd�to_datetimerrCr)rA)r0�bellyr�r�r�r�rxs       r5�#test_constructor_datelike_coercion2z:TestSeriesConstructors.test_constructor_datelike_coercion2�s���� � �"���!�!�#��� � �"���n�n�4�:�:�<�=��
���s�C�5�
Q���������|�|�v�%�%�%��������|�|�v�%�%�%r7c��td�dtjg}||d��}|td�td�tg�}tj||�y)Nr�r&r�r()rr�_valuer-r.)r0r�r�rxr4s     r5�(test_constructor_mixed_int_and_timestampz?TestSeriesConstructors.test_constructor_mixed_int_and_timestamp�sI���!��b�#�*�*�-�� ��X�6��"�I�a�L�)�B�-��#E�F��
�����)r7c��tjddddtj�dg�tjddtj�dg�fD]}t	|�}|j
dk(r�J�y)Nr�)r*rPr�nowrr))r0r�rxs   r5�%test_constructor_datetimes_with_nullsz<TestSeriesConstructors.test_constructor_datetimes_with_nulls�sl��
�H�H�d�D�$��h�l�l�n�d�C�D��H�H�d�D�(�,�,�.�$�7�8�
�	,�C��C�[�F��<�<�8�+�+�+�	,r7c	�r�ttdtd���}t|�j	�sJ�tttd���}t|�j	�rJ�tt
jdtd���}t|�j	�sJ�ttddddd�tgd�	�}t|d�sJ�|jdk(sJ�ttddddd�t
jgd�	�}t|d�sJ�|jdk(sJ�y)
Nr�r�r�rVrar>r�rr()	rr	r�rr9r*r�rr)rus  r5�!test_constructor_dtype_datetime64z8TestSeriesConstructors.test_constructor_dtype_datetime64�s����4�x�u�Q�x�8���A�w�{�{�}��}�
�4�u�Q�x�(����7�;�;�=� � ��2�6�6���q��:���A�w�{�{�}��}��H�T�1�a��A�.��5�X�F���A�a�D�z��z��w�w�(�"�"�"��H�T�1�a��A�.����7�x�H���A�a�D�z��z��w�w�(�"�"�"r7c	���tddd�tddd�tddd�g}|D�cgc]}tj|���}}t|�}|jdk(sJ�tj
|jd<|jdk(sJ�t|d��}tt|�jtj�d	zd
��}tj||�t|d��}tj||�tttddd�tddd�gd��}ttj
g|ddzd��}tj||�ycc}w)N��r>r�r�r�rzdatetime64[ms]r(�@B�M8[ms]rL)rr*�
datetime64rr)r�r�r,r�r-rBr)r0�pydatesr��datesr;r4rxs       r5�$test_constructor_dtype_datetime64_10z;TestSeriesConstructors.test_constructor_dtype_datetime64_10�sB���D�!�Q�'��$��1�)=�x��a�QR�?S�T��+2�3�a����q�!�3��3��U�m���y�y�H�$�$�$��f�f�������y�y�H�$�$�$��'�)9�:����u�
�,�,�R�X�X�6��@��Q��
���v�x�0���%5�6��
���v�x�0��
�(�4��A�&���q�!�(<�=�EU�
�������5���9�,�4D�E��
���v�x�0��+4s�E2c��tddd�tddd�tddd�g}|D�cgc]}tj|���}}t|d��}|j	d�d}tjt|�	�5|j	d
�ddd�t|tj��}t|j	tj��}tj||�ycc}w#1swY�hxYw)Nr�r>r�r�rLr(r�z:Converting from datetime64\[ns\] to int32 is not supportedrJr)rr*r�rr,rMrNr}r�r-rB)r0r�r�r��dtsrQrxr4s        r5�$test_constructor_dtype_datetime64_11z;TestSeriesConstructors.test_constructor_dtype_datetime64_11�s����D�!�Q�'��$��1�)=�x��a�QR�?S�T��+2�3�a����q�!�3��3��U�"2�3��	�
�
�7��L��
�]�]�9�C�
0�	 ��J�J�w��	 ���2�8�8�,���#�*�*�R�X�X�.�/��
���v�x�0��#4�	 �	 �s�C8�C=�=Dc��ttddd�g�}|dtddddd�k(sJ�ttddd�g�}|dtddddd�k(sJ�y)Nr�r>ri�)rrr�s  r5�#test_constructor_dtype_datetime64_9z:TestSeriesConstructors.test_constructor_dtype_datetime64_9�sl����!�Q��*�+�,���a�y�H�Q��1�a��3�3�3�3���$��1�-�.�/���a�y�H�T�1�a��A�6�6�6�6r7c�r�ttd�dgddg��}|dtd�k(sJ�|ddk(sJ�y)Nr�r>r�r�rV)rrr�s  r5�#test_constructor_dtype_datetime64_8z:TestSeriesConstructors.test_constructor_dtype_datetime64_8sE����:�.��2�3��*�E���c�{�i�
�3�3�3�3��c�{�a���r7c���tddd��}|jtj�j	d�}t||��}dD]�}tjd|�d	��}|jtj�j	|�}t||�}|d
k(rtjd�}|j|k(sJ�tj||j	|����t||t��}dD]\}|jtj�j	d|�d	��}t||t��}tj||��^tj|j�D�cgc]}|j���c}t�
�}	t|	|�}
tj|
j|	�|
jtk(sJ�ycc}w)Nz01-Jan-2015z01-Dec-2015�MErmrLrV)r�D�ms�us�nszM8[�]r�r'r�r()r�viewr*�ndarrayr,rr)r-rBrArPr?r@rUr2)r0r��values2r4�unitr)�values1rxr��dates2�series1s           r5�#test_constructor_dtype_datetime64_7z:TestSeriesConstructors.test_constructor_dtype_datetime64_7s����=�-�d�C���*�*�R�Z�Z�(�/�/�0@�A���'��/��0�	C�D��H�H�s�4�&��]�+�E��j�j����,�3�3�E�:�G��G�U�+�F��s�{�����)���<�<�5�(�(�(��"�"�6�8�?�?�5�+A�B�	C��'��f�=��1�	5�E��j�j����,�3�3�c�%���N�C�G��G�5��?�F��"�"�6�8�4�	5����U�-@�-@�-B�C��1�6�6�8�C�6�R�����'��
�#�#�G�N�N�F�;��}�}��&�&�&��Ds�G.c�t�tdtdg�}|jtk(sJ�ttj
tdg�}|jtk(sJ�ttddg�}|jtk(sJ�tttj
dg�}|jtk(sJ�y)Nz2013-08-05 15:30:00.000001)rrr)rAr*r�r:s  r5�#test_constructor_dtype_datetime64_6z:TestSeriesConstructors.test_constructor_dtype_datetime64_6%s����d�C�!=�>�?���y�y�F�"�"�"��b�f�f�c�#?�@�A���y�y�F�"�"�"��c�4�!=�>�?���y�y�F�"�"�"��c�2�6�6�#?�@�A���y�y�F�"�"�"r7c�^�tdd��}t|�jdj�J�tddd��}t	t|�jdj�dk(sJ�tddd��}t	t|�jdj�dk(sJ�y)Nr�r�r�r�UTCr�r)rrr�rr�)r0�drs  r5�#test_constructor_dtype_datetime64_5z:TestSeriesConstructors.test_constructor_dtype_datetime64_55s����
�A�
.���b�z���q�!�$�$�,�,�,�
�
�A�%�
8���6�"�:�?�?�1�%�(�(�)�U�2�2�2�
�
�A�,�
?���6�"�:�?�?�1�%�(�(�)�\�9�9�9r7c��tddtg�}|jdk(sJ�|dtusJ�dt|�vsJ�y)Nl*�}aiZl�rAr�r)rrr)r�r:s  r5�#test_constructor_dtype_datetime64_4z:TestSeriesConstructors.test_constructor_dtype_datetime64_4?sG���m�X�s�3�4���y�y�H�$�$�$��1�v��}��}���C�� � � r7c��ttddd�tddd�tg�}|jdk(sJ�|dtusJ�dt	|�vsJ�y)N��r>r�rAr)rrrr)r�r:s  r5�#test_constructor_dtype_datetime64_3z:TestSeriesConstructors.test_constructor_dtype_datetime64_3FsY���h�t�Q��*�H�Q��1�,=�s�C�D���y�y�H�$�$�$��1�v��}��}���C�� � � r7c���ttddd�tddd�tjg�}|jdk(sJ�|dtjusJ�dt|�vsJ�y)Nr
r>r�rA�NaN)rrr*r�r)r�r:s  r5�#test_constructor_dtype_datetime64_2z:TestSeriesConstructors.test_constructor_dtype_datetime64_2Msc���h�t�Q��*�H�Q��1�,=�r�v�v�F�G���y�y�H�$�$�$��1�v���������C�� � � r7c��tddd��}t|�}|jjdk(sJ�|jdk(sJ�t	|jt
�sJ�dt
|�vsJ�|j}t	|tj�sJ�|jdk(sJ�t|�}|jd�j|jj��}tj ||�|j"d	}|t%d
d��k(sJ�|d	}|t%d
d��k(sJ�|tgd�|j&��}tj(||d	d
�|j"d	d}tj(|t|d	d��t+j,|j"d	d|j"ddg�}tj(||�dt
|�vsJ�|j/�}dt
|�vsJ�dt
|�vsJ�t|d��}tj ||�y)Nr�r�rr��datetime64[ns, US/Eastern]rLr�rrz2013-01-01 00:00:00-0500r`rVr�r>r�inferrm)rrr)r|r�rr�r2r*r�r�tz_localize�
tz_convert�dtrr-rCr�rrWrBr��concat�shift)r0rrrxr$s     r5�!test_constructor_with_datetime_tzz8TestSeriesConstructors.test_constructor_with_datetime_tzTs���
�A�,�
?���2�J���w�w�|�|�;�;�;�;��w�w�6�6�6�6��!�'�'�?�3�3�3�+�s�1�v�5�5�5������&�"�*�*�-�-�-��|�|�/�/�/�/��F�#���o�o�e�$�/�/�1�4�4�7�7�/�;��
���b�#�&���������#=�,�O�O�O�O��1�����#=�,�O�O�O�O��6�-�Q�W�W�=�>��
���v�q��1�v�.�����!���
���v�v�b��1�g��7����A�F�F�1�Q�K�������4�5��
���v�q�)�,�s�1�v�5�5�5������+�s�6�{�:�:�:���F��#�#�#��q�w�/��
���f�b�)r7c�P�ttddd���}dt|�vsJ�y)Nr���rr�r)rrr�r:s  r5�"test_constructor_with_datetime_tz5z9TestSeriesConstructors.test_constructor_with_datetime_tz5�s'���Z�
�D�\�J�K��+�s�3�x�7�7�7r7c��ttdd��tdd��g�}|jdk(sJ�tj|d��dk(sJ�y)	N�2013-01-01 13:00:00-0800�
US/Pacificr�2013-01-02 14:00:00-0800zdatetime64[ns, US/Pacific]T��skipnar��rrr)r
�infer_dtyper:s  r5�"test_constructor_with_datetime_tz4z9TestSeriesConstructors.test_constructor_with_datetime_tz4�sU����4��F��4��F�
�
���y�y�8�8�8�8����s�4�0�L�@�@�@r7c��ttdd��tdd��g�}|jdk(sJ�tj|d��d	k(sJ�y)
Nr r!rr"rrATr#rr%r:s  r5�"test_constructor_with_datetime_tz3z9TestSeriesConstructors.test_constructor_with_datetime_tz3�sT����4��F��4��F�
�
���y�y�H�$�$�$����s�4�0�J�>�>�>r7c��ttddgd��}tddgd��jd�}t|�}t	j
||�y)	Nrr>rr�rrrr�)rrr�as_unitr-rB)r0r;�dtir4s    r5�"test_constructor_with_datetime_tz2z9TestSeriesConstructors.test_constructor_with_datetime_tz2�sI���S��A��.J�K���U�E�N�|�<�D�D�T�J���#�;��
���s�H�-r7c����dtd�dddg�t���t��fd�tt	���D��sJ�y)Nr�z
1990-01-01z2015-03-14T16:15:14.123-08:00z2019-03-04T21:56:32.620-07:00c3�2�K�|]}�|�|u���y�wrcr_)rerr;rEs  ��r5rgzVTestSeriesConstructors.test_constructor_no_partial_datetime_casting.<locals>.<genexpr>�s�����?��3�q�6�T�!�W�$�?�s�)rrr9r�rw)r0r;rEs @@r5�,test_constructor_no_partial_datetime_castingzCTestSeriesConstructors.test_constructor_no_partial_datetime_casting�sH���
��l�#�+�+��
���T�l���?�e�C��I�.>�?�?�?�?r7�	arr_dtype�kind�Mr�r�)r�r�r�rrr�r�c�z�|�d|�d�}tjgd�|��}t|�}|j|�}t|j|��}|dvr"|j|k(sJ�|j|k(s*J�|j|�d�k(sJ�|j|�d�k(sJ�tj||�y)N�8[r�r�r()r�r�r�rz8[s])r*rPrr,r)r-rB)	r0r1r2r�r)r�r;rxr4s	         r5�&test_construction_to_datetimelike_unitz=TestSeriesConstructors.test_construction_to_datetimelike_unit�s����&��4�&��"���h�h�y�	�2���S�k�����E�"���#�*�*�U�+�,���*�*��<�<�5�(�(�(��>�>�U�*�*�*��<�<�d�V�4�=�0�0�0��>�>��v�T�]�2�2�2�
���v�x�0r7�argz2013-01-01 00:00:00c��t|gd��}tt|��jjd�}t	j
||�y)Nzdatetime64[ns, CET]r(�CET)rrrrr-rB)r0r7rxr4s    r5�7test_constructor_with_naive_string_and_datetimetz_dtypezNTestSeriesConstructors.test_constructor_with_naive_string_and_datetimetz_dtype�sB�����%:�;���)�C�.�)�,�,�8�8��?��
���v�x�0r7c�4�tjdd�}tjtjdd�gd��}t|�}tt	|�g�jd�}|jdk(sJ�tj||�y)Nr>r�z>M8[ms]r(r�)	r*r�rPrrr,r)r-rB)r0r�r�rxr4s     r5�%test_constructor_datetime64_bigendianz<TestSeriesConstructors.test_constructor_datetime64_bigendian�sv��
�]�]�1�d�
#���h�h��
�
�a��.�/�y�A�������9�R�=�/�*�1�1�(�;���~�~��)�)�)�
���v�x�0r7�interval_constructorc���|jtjd�d��}t|�}|jdk(sJ�tjt|j�t|��y)Nr�r��closedzinterval[int64, right])	�from_breaksr*r+rr)r-rCrr2)r0r=�	intervalsrxs    r5�test_construction_intervalz1TestSeriesConstructors.test_construction_interval�s\��)�4�4�R�Y�Y�q�\�'�4�R�	��	�"���|�|�7�7�7�7�
���e�F�M�M�2�E�)�4D�Er7�data_constructorr/zndarray[object]c���tdd�tdd�dg}t||��}tt|��}|jdk(sJ�t	j
||�y)Nrr>r�zinterval[float64, right])rrr r)r-rB�r0rDrlrxr4s     r5�test_constructor_infer_intervalz6TestSeriesConstructors.test_constructor_infer_interval�s^��
��A����A���5���(��.�/���-��-�.���|�|�9�9�9�9�
���v�x�0r7c��tddd��tddd��g}t||��}|jtk(sJ�|j	�|k(sJ�y)Nrr>�bothr?r��neither)rrr)rAr�)r0rDrlrxs    r5�&test_constructor_interval_mixed_closedz=TestSeriesConstructors.test_constructor_interval_mixed_closed�sV��
��A�f�-�x��1�Y�/O�P���(��.�/���|�|�v�%�%�%��}�}��$�&�&�&r7c�$�ttddd���}t||j��}tj||�t|j
j
d�|j��}tj||�t|j|j��}t|j�j
j|jj�}tj||�tjd�5t|j�j
jd�}|j
j
|jj�}ddd�tj||�tjd�5t|jjd�|j��}ddd�tj||�y#1swY��xYw#1swY�,xYw)Nr�r�rr�r(rr�)rrr)r-rBrrr2rrr�r�)r0r;rxr4�middles     r5�test_construction_consistencyz4TestSeriesConstructors.test_construction_consistency�sy���Z�
�A�,�G�H����3�9�9�-��
���v�s�+�����)�)�%�0��	�	�B��
���v�s�+���
�
�#�)�)�4���#�*�*�%�(�(�4�4�S�Y�Y�\�\�B��
���v�x�0�
�
'�
'��
-�	8��C�J�J�'�*�*�6�6�u�=�F��Y�Y�)�)�#�)�)�,�,�7�F�	8�	���v�s�+�
�
'�
'��
-�	G��C�J�J�O�O�G�4�C�I�I�F�F�	G�	���v�s�+�	8�	8��	G�	G�s�AG:�*1H�:H�Hc���tdd�tdd�dg}t||��}tt|��}tj||�|j
dk(sJ�y)N�2000r��2001�	Period[D])rrr!r-rBr)rFs     r5�test_constructor_infer_periodz4TestSeriesConstructors.test_constructor_infer_periods_���v�s�#�V�F�C�%8�$�?���(��.�/���,�t�,�-��
���v�x�0��|�|�{�*�*�*r7z$PeriodDtype Series not supported yet��reasonc��tdddtjjgd��}|d}t	|�sJ�||d<t	|d�sJ�y)Nrr��z	period[D]r(r�r�)rr��_libsr	r�r0rF�vals   r5�;test_construct_from_ints_including_iNaT_scalar_period_dtypezRTestSeriesConstructors.test_construct_from_ints_including_iNaT_scalar_period_dtypesM����D�$����
�
�6�k�J���Q�i���C�y��y���q�	��F�1�I���r7c��tdd�tdd�g}t|�}|jtk(sJ�|j	�|k(sJ�y)NrPr�rQ�Y)rrr)rAr�)r0rlrxs   r5�.test_constructor_period_incompatible_frequencyzETestSeriesConstructors.test_constructor_period_incompatible_frequency&sI���v�s�#�V�F�C�%8�9�������|�|�v�%�%�%��}�}��$�&�&�&r7c� �tddd��}t|�}|jdk(sJ�tjt
d��5t|j
t��}ddd�tj|�y#1swY� xYw)Nr�r�r�rrR�Dtype inferencerJ)	rrr)r-r�r�r,rArB)r0�pirr4s    r5�test_constructor_periodindexz3TestSeriesConstructors.test_constructor_periodindex,sv���*�a�c�
:���2�J���w�w�+�%�%�%�
�
'�
'�
�=N�
O�	1��b�i�i��/�0�H�	1�
���q�(�+�	1�	1�s�B�B
c�0�dddd�}t|�}t|t|j����}tj||�t|gd���}tddt
jd	ggd���}tj||�td
dd�
�}|d	d	|ddi}t||��}tt
j|t
j��}d	|jd	<d|jd<tj||�y)Nr_rrr-rV)r�r�r�r�r>r�rr�r&r�rr()
rr��keysr-rBr*r�rr�r�)r0r�rxr4�pidxs     r5�test_constructor_dictz,TestSeriesConstructors.test_constructor_dict7s����C�c�*�������!�6�!�&�&�(�#3�4��
���v�x�0���!5�6���1�a�����+�3G�H��
���v�x�0��L�"�3�?��
�!�W�a��a��!�$�����&���"�&�&�$�b�j�j�9����
�
�a����
�
�a��
���v�x�0r7c�~�ddgdgdggi}t|dgd��}t|dg��}tj||�y)Nr�r�r�r�rAr�rVr��r0r�rxr4s    r5�/test_constructor_dict_list_value_explicit_dtypezFTestSeriesConstructors.test_constructor_dict_list_value_explicit_dtypeJsF��
�A�3���a�S�/�"����#��h�7���!�C�5�)��
���v�x�0r7c��dddd�}t|�}tgd�td���}tj||�y)Nr>rr�r�)r>rr��bacrV)rr/r-rBrhs    r5�test_constructor_dict_orderz2TestSeriesConstructors.test_constructor_dict_orderQs9���!�!�$�������)�4��;�7��
���v�x�0r7c� �|\}}t|t�r1tjj	d��}|j|�d|i}t
|dg��}t
|dg|��}|j|k(sJ�tj||�y)NzMConstruction from dict goes through maybe_convert_objects which casts to nanorTr�rVr�)
r�rrM�mark�xfail�applymarkerrr)r-rB)	r0r��requestr�r�rnr�rxr4s	         r5�test_constructor_dict_extensionz6TestSeriesConstructors.test_constructor_dict_extensionYs���1��	�8��i��+��;�;�$�$�<�%��D�
����%�
�)�����#��'���)�C�5��A���|�|�x�'�'�'�
���v�x�0r7r�c	��dd|dtd�dddi}t|�j�}tgd�d|tjdg�	�}tj||�d
ddtjfdd|fdi}t|�j�}tgd
�td
dtjfd|fg��	�}tj||�y)Nr>r�r�r�r�r�r��r�r�r�r�rV�r>r>r�r�r-)r�r�sort_valuesr*r�r-rBr)r0r�r�rxr4s     r5�test_constructor_dict_nan_keyz4TestSeriesConstructors.test_constructor_dict_nan_keyis�����U�C��u��s�A�s�;�����&�&�(���.�q�%�����6K�L��
���v�x�0��S�1�b�f�f�+�s�Q��J��<�����&�&�(����5�&�1�b�f�f�+��5�z�)J�#K�
��	���v�x�0r7c�f�	�
�gd��	gd��
�	�
fd�}|tj�}|d��}|t�}t�
d��	D��}t|�}t|�}t|�}t	j
||�t	j
||�t	j
||�y)N)z
1984-02-19z
1988-11-06z
1989-12-03z
1990-03-15)g{��\I�Ai��g��tyZQ�Ar�c�B���tt�fd��D����S)Nc3�.�K�|]}�|����y�wrcr_)rer�rSs  �r5rgzeTestSeriesConstructors.test_constructor_dict_datetime64_index.<locals>.create_data.<locals>.<genexpr>�s�����B��[��^�B�s�)�dict�zip)rS�dates_as_strr2s`��r5�create_datazRTestSeriesConstructors.test_constructor_dict_datetime64_index.<locals>.create_datas�����B�\�B�F�K�L�Lr7c�.�tj|d�S)Nz%Y-%m-%d)r�strptimer�s r5rZzOTestSeriesConstructors.test_constructor_dict_datetime64_index.<locals>.<lambda>�s��h�.?�.?��:�.N�r7c3�2K�|]}t|����y�wrc)rr(s  r5rgzPTestSeriesConstructors.test_constructor_dict_datetime64_index.<locals>.<genexpr>�s����"F�A�9�Q�<�"F�s�)r*r�rrr-rB)r0r~�data_datetime64�
data_datetime�data_Timestampr4�result_datetime64�result_datetime�result_Timestampr}r2s         @@r5�&test_constructor_dict_datetime64_indexz=TestSeriesConstructors.test_constructor_dict_datetime64_indexys����P��F��	M�&�b�m�m�4��#�$N�O�
�$�Y�/���&�"F��"F�G��"�?�3�� ��/��!�.�1��
���0�(�;�
�����9�
���/��:r7c	��ddi}t|�}tdtdgdgtjggdgdgdgg����}t	j
||�y)N)r>r>Ng�r>rr�)�levels�codesrV)rrr*r�r-rBrhs    r5�#test_constructor_dict_tuple_indexerz:TestSeriesConstructors.test_constructor_dict_tuple_indexer�s]���d�#��������
�A�3���b�f�f�X�*>��s�Q�C�RT�QU�FV�W�
��	���v�x�0r7c�x�|ddi�}t|�}tdgdg��}tj||�y)Nr��threerVr�)r0�non_dict_mapping_subclass�ndmrxr4s     r5�test_constructor_mappingz/TestSeriesConstructors.test_constructor_mapping�s9��'��G��5�������7�)�A�3�/��
���v�x�0r7c�B�gd�}t|�}t|�|k(sJ�y�N)ru)r�r�)r�r�)rr/�r0rlrs   r5�test_constructor_list_of_tuplesz6TestSeriesConstructors.test_constructor_list_of_tuples�s ��'���4�L���A�w�$���r7c�>�d}t|�}t|�|k(sJ�yr�)r�tupler�s   r5� test_constructor_tuple_of_tuplesz7TestSeriesConstructors.test_constructor_tuple_of_tuples�s"��'���4�L���Q�x�4���r7c��ddd�}t|�j�}tddgtjddg���}t	j
||�y)Nr�r�)�r>r��Nr�r�r�rV)rrvr�from_tuplesr-rBrhs    r5�test_constructor_dict_of_tuplesz6TestSeriesConstructors.test_constructor_dict_of_tuples�sN���a�(�����)�)�+���1�a�&�
�(>�(>��	�?R�(S�T��
���v�x�0r7z+ignore:elementwise comparison:FutureWarningc��ddddd�}t|�}tj|j�dddt	j
�d�}t|�}|jtjk(sJ�ddddd�}t|�}|s|jtjk(sJ�	d	dd
�}t|t��}|jtjk(sJ�y)Nrr>r�r�rtr	r
�3�0�r�r�r()rr-�assert_is_sortedrWrr�r)r*r�r�r�)r0r�rlrFs    r5�
test_fromDictz$TestSeriesConstructors.test_fromDict�s����Q�Q�Q�/������
���F�L�L�)��S�s�����@�������|�|�r�z�z�)�)�)��S�s��5������1C�v�|�|�r�z�z�)�Q�Q���s�#����E�*���|�|�r�z�z�)�)�)r7c�&�ttj|jtj��}|j
tjk(sJ�t
|�t
|�k(sJ�td|j��}|s|j
tjk(sJ�	t
|�t
|�k(sJ�tj�}t||j��}|j
dk(sJ�t
|�t
|�k(sJ�td|jd��}td|j��jd�}|j
dk(sJ�t
|�t
|�k(sJ�tj||�y)Nr�r�rVzM8[us]rr�)
rr*r�rWr�r)rwr�rr�r,r-rB)	r0r�r��nans�stringsr�r��categoricalr4s	         r5�test_fromValuez%TestSeriesConstructors.test_fromValue�sC���b�f�f�O�$9�$9����L���z�z�R�Z�Z�'�'�'��4�y�C��0�0�0�0���o�&;�&;�<��2D�w�}�}��
�
�*�R�R�(��7�|�s�?�3�3�3�3��L�L�N���q�� 5� 5�6���{�{�h�&�&�&��5�z�S��1�1�1�1��Q�o�&;�&;�:�N���!�?�#8�#8�9�@�@��L��� � �J�.�.�.��;��3��#7�7�7�7�
���{�H�5r7c� �ttd�D�cgc]}t|����c}�}|jdk(sJ�ttd��g�}|jdk(sJ�ttd��td��t	j
dd�g�}|jdk(sJ�ttd��tgd��}|jdk(sJ�ttd��tjgd��}|jdk(sJ�tt	j
d	�tgd��}|jdk(sJ�tt	j
d	�tg�}|jdk(sJ�tt	j
d	�tg�}|jd
k(sJ�tt	j
d	�tjg�}|jdk(sJ�ttt	j
d	�g�}|jdk(sJ�tt	j
dd�g�}|jdk(sJ�|jd�d}tjt|�
�5|jd�ddd�djddg�}tjt|�
�5ttd��dgd��ddd�ttd�D�cgc]}t|����c}dgz�}|jd
k(sJ�tdtdg�}|jtk(sJ�ttjtdg�}|jtk(sJ�ttddg�}|jtk(sJ�tttjdg�}|jtk(sJ�ycc}w#1swY��YxYw#1swY��xYwcc}w)Nr�)�days�timedelta64[ns]r>r�rr�r(i��rAr�z;Converting from timedelta64\[ns\] to int32 is not supportedrJr�|z+Could not convert object to NumPy timedeltaz*Could not convert 'foo' to NumPy timedeltar�z1 Day)rr�rr)r*�timedelta64rr�r	r,rMrNr}�joinrOrA)r0r�tdrQr;s     r5�"test_constructor_dtype_timedelta64z9TestSeriesConstructors.test_constructor_dtype_timedelta64�sk��
��a��9�1�Y�A�&�9�
:���x�x�,�,�,�,�
�Y�A�&�'�
(���x�x�,�,�,�,�
�Y�A�&�	�q�(9�2�>�>�!�S�;Q�R�
S���x�x�,�,�,�,��Y�A�&��,�H�
=���x�x�,�,�,�,�
�Y�A�&����/�x�
@���x�x�,�,�,�,�
�R�^�^�I�.��4�H�
E���x�x�,�,�,�,��R�^�^�I�.��4�
5���x�x�,�,�,�,��R�^�^�I�.��5�
6���x�x�8�#�#�#�
�R�^�^�I�.����7�
8���x�x�,�,�,�,�
�S�"�.�.��3�4�
5���x�x�,�,�,�,�
�R�^�^�A�s�+�,�
-���x�x�,�,�,�,�	��	�	�'��M��
�]�]�9�C�
0�	��B�I�I�g��	��h�h�=�<�
�
���]�]�:�S�
1�	?��I�1�%�u�-�X�>�	?���a��9�1�Y�A�&�9�U�G�C�
D���x�x�8�#�#�#��d�C��)�*���y�y�F�"�"�"��b�f�f�c�7�+�,���y�y�F�"�"�"��c�4��)�*���y�y�F�"�"�"��c�2�6�6�7�+�,���y�y�F�"�"�"��Q:�V	�	��	?�	?��:s#�O,�O1�O>�P�1O;�>Pc��ttd�tdd��g�}ttd�tdd��gd��}tj||�y)Nr�rrrAr()rrr-rBr�s   r5�test_constructor_mixed_tzz0TestSeriesConstructors.test_constructor_mixed_tz(sP���I�j�)�9�Z�L�+Q�R�S���
�z�
"�I�j�\�$J�K��
��	���q�(�+r7c�|�tdddtgd��}|d}t|�sJ�||d<t|d�sJ�y)NrrrWr�r(r�r�)rr	rrYs   r5�test_NaT_scalarz&TestSeriesConstructors.test_NaT_scalar0sE����D�$��-�X�>���Q�i���C�y��y���q�	��F�1�I���r7c��ttjg�jd�}ttgd��}tj||�y)Nr�r()rr*r�r,rr-rBrKs   r5�
test_NaT_castz$TestSeriesConstructors.test_NaT_cast9s;�������!�(�(��2���3�%�x�0��
���v�x�0r7c��dddtddd�ddfD]B}gd�tjd	�d
dd�fD] }t||�
�}|j|k(r� J��Dy)Ni	gH�@r|ra��r>uאr�r�rr>r�r7)rr*�onesrr|)r0�nrlrs    r5�test_constructor_name_hashablez5TestSeriesConstructors.test_constructor_name_hashable?sf���u�f�h�t�R��&<�d�H�M�	#�A�"�B�G�G�A�J�a�a�0@�A�
#���4�a�(���v�v��{�"�{�
#�	#r7c��d}dgtjd�ddifD]S}dgtjd�ddifD]3}tjt|��5t||��ddd��5�Uy#1swY�BxYw)Nz$Series\.name must be a hashable type�	name_listr�r>rJr7)r*r�rMrNr}r)r0rQr�rls    r5� test_constructor_name_unhashablez7TestSeriesConstructors.test_constructor_name_unhashableEs���5���-������a��V�4�	)�A�%������
�Q��F�;�
)���]�]�9�C�8�)��4�a�(�)�)�
)�	)�)�)�s�A5�5A>c�d�tttdd����}|jdk(sJ�y)N�1/1/2000r&r�r�)rr/rr)�r0rFs  r5�test_auto_conversionz+TestSeriesConstructors.test_auto_conversionLs*����Z�
�B�?�@�A���|�|�x�'�'�'r7c���tjgd�d��}t|�}|j|jk(sJ�t	ddd��jd�}t|�}|j|jk(sJ�t
j||�tjgd�d	��}t|�}ttd
dd��d��}|jdk(sJ�t
j||�tjgd
�d��}t|�}ttddd��d��}|jdk(sJ�t
j||�y)Nr��timedelta64[s]r(z00:00:01r�rr)�
2013-01-01z
2013-01-02z
2013-01-03z
datetime64[D]r�r�r')z2013-01-01 00:00:01z2013-01-01 00:00:02z2013-01-01 00:00:03z
datetime64[s]z20130101 00:00:01)	r*rPrr)rr+r-rBr)r0r�r;�tdir4s     r5�test_convert_non_nsz*TestSeriesConstructors.test_convert_non_nsPs-���h�h�y�(8�9���S�k���y�y�C�I�I�%�%�%��j�!�#�>�F�F�s�K���#�;���~�~����*�*�*�
���s�H�-��h�h�6�o�
���S�k���*�Z���E�W�U���~�~��(�(�(�
���s�H�-��h�h�Q�!�
���S�k����*�A�C�@��
���~�~��(�(�(�
���s�H�-r7r�r&z2000-Q1c�,�t|�jSrcr�r�s r5rZzTestSeriesConstructors.<lambda>vr�r7c��dt|�jjd��d�}tjt
|��5t
|t��ddd�t
|tj��}t
|jtj��}tj||�y#1swY�cxYw)NzCannot cast rz.*? to rJr()
r�r��rstriprMrNr}rr�r*r�r,r-rB)r0rWrQrxr4s     r5�'test_constructor_cant_cast_datetimelikez>TestSeriesConstructors.test_constructor_cant_cast_datetimelikeos����T�%�[�1�1�8�8��A�B�'�J��
�]�]�9�C�
0�	'��5��&�	'���R�X�X�.���%�,�,�r�x�x�0�1��
���v�x�0�	'�	'�s�B8�8Cc�,�t|�jSrcr�r�s r5rZzTestSeriesConstructors.<lambda>�r�r7c���t|t��}t|�jt�}tj||�tt|t��t��}t|�jt�}tj||�t|jt�t��}t|�jt�}tj||�yr)rrAr,r-rBr)r0rWrr$s    r5�test_constructor_cast_objectz3TestSeriesConstructors.test_constructor_cast_object�s���
�5��'���U�m�"�"�6�*��
���q�#�&��5��f�-�V�<���U�m�"�"�6�*��
���q�#�&��5�<�<��'�v�6���U�m�"�"�6�*��
���q�#�&r7c�&�d}tj|�jdvr1tjjd��}|j
|�tjt|��5tg|��ddd�y#1swYyxYw)Nz!dtype has no unit. Please pass in)r�r�zGH#33890 Is assigned ns unitrTrJr()
r*r)r|rMrnrorprNrOr)r0r)rqrQrns     r5�/test_constructor_generic_timestamp_no_frequencyzFTestSeriesConstructors.test_constructor_generic_timestamp_no_frequency�ss��2��
�8�8�E�?���'D�D��;�;�$�$�,J�$�K�D�����%�
�]�]�:�S�
1�	$��2�U�#�	$�	$�	$�s�0B�B)	�ps�as�fsr]r3�Wr�rr�c��|�d|�d�}d}tjt|��5tg|��ddd�tjt|��5t	dgg|��ddd�y#1swY�=xYw#1swYyxYw)Nr5r�z4dtype=.* is not supported. Supported resolutions arerJr(r)rMrNr}rr)r0r2r�r)rQs     r5�0test_constructor_generic_timestamp_bad_frequencyzGTestSeriesConstructors.test_constructor_generic_timestamp_bad_frequency�s����&��4�&��"��D��
�]�]�9�C�
0�	$��2�U�#�	$��]�]�9�C�
0�	*���s�e�5�)�	*�	*�	$�	$��	*�	*�s�A0�A<�0A9�<B)Nr�r�c��tgd�|xsd��}ttd�|��}tj||�y)N)rr>r�r�r�r�r(r�r�)r0r)r4rxs    r5�test_constructor_range_dtypez3TestSeriesConstructors.test_constructor_range_dtype�s5���/��1A�'�B����a���.��
���v�x�0r7c��tdd�}t|�}tt|��}tj||�t|�t|�k(sJ�|j
tjk(sJ�tddd�}t|�}tt|��}tj||�t|�t|�k(sJ�|j
tjk(sJ�tddd�}t|�}tt|��}	tj||	�t|�t|�k(sJ�|j
tk(sJ�tddzddzdz�}
t|
�}tt|
��}tj||�t|�t|
�k(sJ�|j
tk(sJ�y)	Nllr�l����l����r��Ir�)	r�rr/r-rBr)r*�uint64rA)
r0rpr;r4�rng2�ser2�	expected2�rng3�ser3�	expected3�rng4�ser4�	expected4s
             r5� test_constructor_range_overflowsz7TestSeriesConstructors.test_constructor_range_overflows�s����E�9�%���S�k���$�s�)�$��
���s�H�-��C�y�D��I�%�%�%��y�y�B�I�I�%�%�%��Y��r�*���d�|���4��:�&�	�
���t�Y�/��D�z�T�$�Z�'�'�'��z�z�R�Y�Y�&�&�&��X�|�R�0���d�|���4��:�&�	�
���t�Y�/��D�z�T�$�Z�'�'�'��z�z�V�#�#�#��Q��U�A�r�E�A�I�&���d�|���4��:�&�	�
���t�Y�/��D�z�T�$�Z�'�'�'��z�z�V�#�#�#r7c��td�tdd��g}t|�}t|t��}tj||�y)Nz2016-05-01 02:03:37z2016-04-30 19:03:37-0700r!rr()rrrAr-rB)r0�dt_listrxr4s    r5�test_constructor_tz_mixed_dataz5TestSeriesConstructors.test_constructor_tz_mixed_data�sF��
�+�,��0�\�B�
�������'��0��
���v�x�0r7�pydtTFc�t�|}td|��}|r|j�}d}tjt|��5t|gd��ddd�tjt|��5tt
j|gt��d��ddd�tjt|��5td|id��ddd�d}tjt|��5t|dgd�	�ddd�y#1swY��xYw#1swY�~xYw#1swY�WxYw#1swYyxYw)
N�2019rzsCannot convert timezone-aware data to timezone-naive dtype. Use pd.Series\(values\).dt.tz_localize\(None\) instead.rJrLr(rz/Cannot unbox tzaware Timestamp to tznaive dtyper�)
rr?rMrNrOrr*rPrAr})r0�tz_aware_fixturer�rrDrQs      r5�'test_constructor_data_aware_dtype_naivez>TestSeriesConstructors.test_constructor_data_aware_dtype_naive�s����
�v�"�
%����!�!�#�B�
G�	��]�]�:�S�
1�	1��B�4�/�0�	1��]�]�:�S�
1�	I��2�8�8�R�D��/�7G�H�	I��]�]�:�S�
1�	4��A�r�7�"2�3�	4�@��
�]�]�9�C�
0�	:��2�a�S�(8�9�	:�	:�	1�	1��	I�	I��	4�	4��	:�	:�s/�D
�1(D�<D"�1D.�
D�D�"D+�.D7c���tddd��}tj|�}t|�}tj|j
tj
d��sJ�y)Nz1/1/2000 00:00:00z1/1/2000 1:59:50�10srmr�)rr*�asarrayr�
issubdtyper))r0rpr�rFs    r5�test_constructor_datetime64z2TestSeriesConstructors.test_constructor_datetime64sI���,�.@�u�M���
�
�3��������}�}�V�\�\�2�8�8�H�+=�>�>�>r7c�t�tdgd�|��}tgd�gd�|��}tj||�y)Nr3r�r�)r3r3r3r�)r0�nullable_string_dtyperxr4s    r5�4test_constructor_datetimelike_scalar_to_string_dtypezKTestSeriesConstructors.test_constructor_datetimelike_scalar_to_string_dtypes2����9�4I�J���/��BW�X��
���v�x�0r7z
2012-01-01r�c���tjd�}t||��}tjj	||��}t|�}tj||�y)NrLr()r��SparseDtyper�arrays�SparseArrayr-rB)r0r2r)rxr�r4s      r5�"test_constructor_sparse_datetime64z9TestSeriesConstructors.test_constructor_sparse_datetime64sQ�����/�0����e�,���i�i�#�#�F�%�#�8���#�;��
���v�x�0r7c��tddd�j��}tddg�}tj||�tddd�j	��}tddg�}tj||�y)Nr>r�r�r�r�)rrdr-rBr2rKs   r5�)test_construction_from_ordered_collectionz@TestSeriesConstructors.test_construction_from_ordered_collection"sm���a�a�(�-�-�/�0���3��*�%��
���v�x�0��a�a�(�/�/�1�2���1�a�&�>��
���v�x�0r7c�f�d}t|dg��}t|�}tj||�y)Nl@=7M.crrVr�)r0r�rxr4s    r5�3test_construction_from_large_int_scalar_no_overflowzJTestSeriesConstructors.test_construction_from_large_int_scalar_no_overflow,s.��)����!��%���!�9��
���v�x�0r7c	���tttddd����}|jdk(sJ�tt	dd��t	dd��g�}|jdk(sJ�y)	Nz
2000-01-01r&r�rrRz
2011-01-01rmz
2011-02-01)rr/rr)rr�s  r5�4test_constructor_list_of_periods_infers_period_dtypezKTestSeriesConstructors.test_constructor_list_of_periods_infers_period_dtype3s`����\�,���M�N�O���|�|�{�*�*�*��
�L�s�
+�V�L�s�-K�L�
���|�|�{�*�*�*r7c��|d�td�D��}t|�}tt|j���}t	j
||�y)Nc3�*K�|]}|d|zf���
y�w)g$@Nr_r(s  r5rgzHTestSeriesConstructors.test_constructor_subclass_dict.<locals>.<genexpr>=s����>�q�a����]�>�s�r&)r�rr{�itemsr-rB)r0�
dict_subclassrlrFr4s     r5�test_constructor_subclass_dictz5TestSeriesConstructors.test_constructor_subclass_dict<sD���>�E�"�I�>�>�������$�t�z�z�|�,�-��
���v�x�0r7c�\�td�td�D��}t|�}tt|j	��t|j���}t
j||�Gd�dt�}t||��}t
j||�y)Nc3�K�|]6}d|��tjjd�j�f���8y�w)�colr�N)r*r�r�rs  r5rgzFTestSeriesConstructors.test_constructor_ordereddict.<locals>.<genexpr>Ds8����
�?@�s�1�#�Y��	�	�-�-�a�0�7�7�9�:�
�s�<>�c��eZdZy)�>TestSeriesConstructors.test_constructor_ordereddict.<locals>.AN)r�r�r�r_r7r5r�rMs��r7r�)rr�rr/r2rdr-rB)r0rlrFr4r�s     r5�test_constructor_ordereddictz3TestSeriesConstructors.test_constructor_ordereddictBs����
�DI�"�I�
�
�������$�t�{�{�}�-�t�D�I�I�K�/@�A��
���v�x�0�	��	���$����
���v�x�0r7c
�V�dddd�}t|j��}t|�}t|D�cgc]}|d��	c}tj|D�cgc]}|d��	c}���}tj||�d|d	<|jdd	|d	f�t|�}t|D�cgc]}|d��	c}t|D�cgc]}|d��	c}d
����}|j|j��}tj||�ycc}wcc}wcc}wcc}w)Nr_rr))r�r�)r�r�)r�r�r>rrVg�[@�zF)�
tupleize_cols)r�rrrr�r-rB�insertr�reindexrW)r0r��_drxr�r4s      r5� test_constructor_dict_multiindexz7TestSeriesConstructors.test_constructor_dict_multiindexSs���#�3�?��
�A�G�G�I�
���������a�Q�q�T��j�&<�&<�B�=O�q�a��d�=O�&P�
��	���v�x�0���#��
�	�	�!�c�1�S�6�]�#��������a�Q�q�T��e�2�,>�a�Q�q�T�,>�e�&T�
�����h�n�n��5��
���v�x�0��
��=O��
��,>s�D�D�3D!�
D&c��dddtjd�}t|�}t|ddj�|j��}tj||�y)Nrr>r�))rr)r�j)rrrr�rV)r*r�r�to_dictrWr-rB)r0rlr4rxs    r5�-test_constructor_dict_multiindex_reindex_flatzDTestSeriesConstructors.test_constructor_dict_multiindex_reindex_flatesL���1�!�"�&�&�I���$�<�����"�
�-�-�/�x�~�~�F��
���v�x�0r7c
�N�tgd�tjgd�d����}ttjdd��dtjdd��d	tjd
d��ditjgd�d����}tj||�y)Nr8)rr&r!r�r�rkrr�r&r�r!r9�rr��to_timedeltar-rBr�s   r5�%test_constructor_dict_timedelta_indexz<TestSeriesConstructors.test_constructor_dict_timedelta_indexms���� �����#�(N�
��������,�c������-�s������-�s��
�/�/�+�C�8�

��	���v�x�0r7c���ddg}tdd�}tdddd|��tdddd|��g}t||�	�}|jj|k(sJ�t|jd
�y)Ng�g@g�t@i i�r�r�)�tzinfor
rkr)rrrrWr�repr)r0r2rrWrFs     r5�test_constructor_infer_index_tzz6TestSeriesConstructors.test_constructor_infer_index_tzst�������$��%���T�1�b�"�V�4��T�1�b�"�V�4�
���V�5�1���|�|���&�(�(�(�	
�V�\�\�!�_�r7c��gd�}t|�}|jj}t||��}tj||�y)N)r�)r�r^r(�rrPr)r-rB)r0rEr;r)r�s     r5�"test_constructor_with_pandas_dtypez9TestSeriesConstructors.test_constructor_with_pandas_dtype�s9��!���T�l���	�	�����d�%�(��
���s�D�)r7c��tdgd��}ttjdgd��}tj||�y)Nrr�r�r�)rr*r�r-rBrKs   r5�)test_constructor_int_dtype_missing_valuesz@TestSeriesConstructors.test_constructor_int_dtype_missing_values�s4���q�c��1���"�&�&���9�=��
���v�x�0r7c�j�tdgd��}tddgd��}tj||�y)Nrrr�Tr�rKs   r5�*test_constructor_bool_dtype_missing_valueszATestSeriesConstructors.test_constructor_bool_dtype_missing_values�s0���q�c��0���$�q�c��8��
���v�x�0r7c�l�tgd�|��}tgd�|��}tj||�y)N)r�r	r
r(r�r�)r0�
any_int_dtyperxr4s    r5�test_constructor_int64_dtypez3TestSeriesConstructors.test_constructor_int64_dtype�s*����}�=���)�=�9��
���v�x�0r7c���tstjtd��}ntjtd��}|5tdgd��ddd�y#1swYyxYw)Nz/string values cannot be losslessly cast to int8rJz!The elements provided in the data�128r�r()rrMrNrOr�r)r0rNs  r5�5test_constructor_raise_on_lossy_conversion_of_stringszLTestSeriesConstructors.test_constructor_raise_on_lossy_conversion_of_strings�sU����]�]��"S��F��]�]��%H��F��	*��E�7�&�)�	*�	*�	*�s�A�A!c��tgd�d��}ttjgd�d���}tj||�y)N�r�i@
i��-r�r(r�rrrKs   r5�6test_constructor_dtype_timedelta_alternative_constructzMTestSeriesConstructors.test_constructor_dtype_timedelta_alternative_construct�s6���2�:K�L���"�/�/�*D�4�P�Q��
���v�x�0r7z�Not clear what the correct expected behavior should be with integers now that we support non-nano. ATM (2022-10-08) we treat ints as nanoseconds, then cast to the requested dtype. xref #48312c�l�tgd�d��}tgd�d��}tj||�y)Nr0r�r(r�r�rKs   r5�%test_constructor_dtype_timedelta_ns_sz<TestSeriesConstructors.test_constructor_dtype_timedelta_ns_s�s0���2�:K�L���4�<L�M��
���v�x�0r7c��tgd�d��jd�}tgd�d��jd�}tj||�y)Nr0r�r(r�r�rrKs   r5�2test_constructor_dtype_timedelta_ns_s_astype_int64zITestSeriesConstructors.test_constructor_dtype_timedelta_ns_s_astype_int64�sP���2�:K�L�S�S��
���4�<L�M�T�T��
��	���v�x�0r7z7ignore:elementwise comparison failed:DeprecationWarning�funcc���djgd��}tjtgzD]3}t	j
t|��5||ddg|��ddd��5y#1swY�@xYw)Nr�)z(cannot safely cast non-equivalent objectzJint\(\) argument must be a string, a bytes-like object or a (real )?numberz[Cannot cast array data from dtype\('O'\) to dtype\('float64'\) according to the rule 'safe'z-object cannot be converted to a FloatingDtypez 'values' contains non-numeric NArJrg@r()r�r-�NP_NAT_OBJECTSrrMrNr})r0r6�any_numeric_ea_dtyperQ�nulls     r5�/test_constructor_mismatched_null_nullable_dtypezFTestSeriesConstructors.test_constructor_mismatched_null_nullable_dtype�sv���h�h�
�

���%�%���-�	C�D����y��4�
C��d�C��%�-A�B�
C�
C�	C�
C�
C�s�
A#�#A,	c��tdddtjgd��}tdddtjgd��}tj||�tgd�d��}tgd�d��}tj||�y)	NTF�Int64r(r>r)TFT)r>rr>)rr��NAr-rBrKs   r5�(test_series_constructor_ea_int_from_boolz?TestSeriesConstructors.test_series_constructor_ea_int_from_bool�sm����u�d�B�E�E�2�'�B���1�a��B�E�E�*�'�:��
���v�x�0��+�7�;���)�7�3��
���v�x�0r7c��tjtd��5tdddtj
gd��ddd�y#1swYyxYw)Nzinvalid literalrJ�True�Falser=r()rMrNrOrr�r>r�s r5�/test_series_constructor_ea_int_from_string_boolzFTestSeriesConstructors.test_series_constructor_ea_int_from_string_bool�sA��
�]�]�:�->�
?�	D��F�G�V�R�U�U�3�7�C�	D�	D�	D�s� A�ArZrc��tjtj�jdz
}t	||gd��}t	tj
|dgd��d��}t
j||�y)Nr>�UInt64r(r�)r*�iinfor��maxrrPr-rB�r0rZ�max_valrxr4s     r5�(test_series_constructor_overflow_uint_eaz?TestSeriesConstructors.test_series_constructor_overflow_uint_ea�s\���(�(�2�9�9�%�)�)�A�-����#��h�7���"�(�(�G�Q�<�x�@��Q��
���v�x�0r7c	�p�tjtj�jdz
}t	||t
jgd��}t	ttj|ddgd��tjgd�tj����}tj||�y)Nr>rEr(rr�)rrr>)r*rFr�rGrr�r>rrP�bool_r-rBrHs     r5�0test_series_constructor_overflow_uint_ea_with_nazGTestSeriesConstructors.test_series_constructor_overflow_uint_ea_with_nas����(�(�2�9�9�%�)�)�A�-����#�r�u�u�-�X�>�������'�1�a���9�����"�(�(�3�
�
��	���v�x�0r7c	�l�tjtj�jdz
}t	|tj
gd��}t	t
tj|dgd��tjddgtj����}tj||�y)Nr>rEr(r�r)r*rFr�rGrr�rrPrLr-rB)r0rIrxr4s    r5�.test_series_constructor_overflow_uint_with_nanzETestSeriesConstructors.test_series_constructor_overflow_uint_with_nans����(�(�2�9�9�%�)�)�A�-����"�&�&�)��:�������'�1��X�6����!�Q��r�x�x�0�
�
��	���v�x�0r7c	�(�ttjtjgd��}tttjddgd��tjddgtj
����}t
j||�y)NrEr(r>r�)rr*r�rrPrLr-rBrKs   r5�!test_series_constructor_ea_all_naz8TestSeriesConstructors.test_series_constructor_ea_all_nasg���������(��9�������!�Q��x�0����!�Q��r�x�x�0�
�
��	���v�x�0r7c��tgd��}|jd��}t|d��}d|jd<t	j
||�y)Nr�T)�deepr�r(r~r)rrSrr�r-rC)r0rFr4r;s    r5�0test_series_from_index_dtype_equal_does_not_copyzGTestSeriesConstructors.test_series_from_index_dtype_equal_does_not_copy'sE���I����8�8��8�&���S��(��������
���c�8�,r7c��tjd�d}tddg|��}tjdd�5tddg�}ddd�tj|�tddgd	��}tjdd�5tddg�}ddd�tj||�y#1swY�qxYw#1swY�,xYw)
N�pyarrow�string[pyarrow_numpy]r�r�r(�future.infer_stringTr>rA�rM�importorskiprr��option_contextr-rB)r0r)r4r;s    r5�test_series_string_inferencez3TestSeriesConstructors.test_series_string_inference/s������I�&�'���3��*�E�2��
�
�
�4�d�
;�	%��#�s��$�C�	%�
���s�H�-��3��(�(�3��
�
�
�4�d�
;�	#��#�q��"�C�	#�
���s�H�-�	%�	%��
	#�	#�s�B;�C�;C�C�na_valuec���tjd�d}td|g|��}tjdd�5td|g�}ddd�tj|�y#1swY� xYw)NrVrWr�r(rXTrY)r0r]r)r4r;s     r5�$test_series_string_with_na_inferencez;TestSeriesConstructors.test_series_string_with_na_inference=sk��	���I�&�'���3��/��7��
�
�
�4�d�
;�	*��#�x��)�C�	*�
���s�H�-�	*�	*�s�A*�*A3c���tjd�tddgd��}tjdd�5tddg��}ddd�tj|�y#1swY� xYw)	NrVr�r>rWr�rXTrVrY�r0r4r;s   r5�#test_series_string_inference_scalarz:TestSeriesConstructors.test_series_string_inference_scalarGse�����I�&��#�a�S�0G�H��
�
�
�4�d�
;�	)���Q�C�(�C�	)�
���s�H�-�	)�	)�s�A)�)A2c��tjd�tddgd��}tjdd�5ttjddg��}ddd�tj|�y#1swY� xYw)NrVr�r�rWr(rXT)	rMrZrr�r[r*rPr-rBras   r5�/test_series_string_inference_array_string_dtypezFTestSeriesConstructors.test_series_string_inference_array_string_dtypeOsn�����I�&��3��*�,C�D��
�
�
�4�d�
;�	/�����3��*�-�.�C�	/�
���s�H�-�	/�	/�s�!A;�;Bc���tjd�tddgd��}tjdd�5tddgd��}ddd�tj|�y#1swY� xYw)	NrVr�r�rWr(rXT�stringrYr�s   r5�/test_series_string_inference_storage_definitionzFTestSeriesConstructors.test_series_string_inference_storage_definitionWsg�����I�&��3��*�,C�D��
�
�
�4�d�
;�	8��S�#�J�h�7�F�	8�
���v�x�0�	8�	8�s�A*�*A3c��tjdd�5tdddgd��}ddd�tddgddgd��}tj|�|j
jdk(sJ�y#1swY�MxYw)	NrXTr�r>r�zstring[python]r��python)r�r[rr-rBr)�storage)r0r;r4s   r5�+test_series_constructor_infer_string_scalarzBTestSeriesConstructors.test_series_constructor_infer_string_scalar_s~��
�
�
�4�d�
;�	D���Q��F�2B�C�C�	D��3��*�Q��F�:J�K��
���s�H�-��y�y� � �H�,�,�,�		D�	D�s�A4�4A=c� �tjd�ttjdgd��}tj
dd�5ttjdg�}ddd�t
j|�y#1swY� xYw)NrVr�rWr(rXT)rMrZrr�r>r[r-rBr�s   r5�%test_series_string_inference_na_firstz<TestSeriesConstructors.test_series_string_inference_na_firstgsm�����I�&��2�5�5�#�,�.E�F��
�
�
�4�d�
;�	*��R�U�U�C�L�)�F�	*�
���v�x�0�	*�	*�s�	B�B
c���ttd�gt��}tjd�5t|�}ddd�j
tjk(sJ�ttd�gt��}tjtd��5t|�}ddd�|j
tjk7sJ�y#1swY��xYw#1swY�5xYw)Nz
2019-12-31r(r`rJ)
rrrAr-r�r)r*r�rr�)r0r;rxrFs    r5� test_inference_on_pandas_objectsz7TestSeriesConstructors.test_inference_on_pandas_objectsos����i��-�.�f�=��
�
'�
'��
-�	!��C�[�F�	!��|�|�r�z�z�)�)�)��Y�|�,�-�V�<��
�
'�
'�
�=N�
O�	!��C�[�F�	!��|�|�r�z�z�)�)�)�	!�	!��	!�	!�s�C�C�C�C#)�r�r�r�r6r<rGrRrMrn�parametrizeryrr�r�r�r�r�r/r{rr�r*r�r�r�rr�r�r�r�r�r�r�r�r�rrrrrrrr%r+r0r3r5r>rDrGrLrQrZr\rerirrrvr�rr|rr�r�r�r�r��skip_array_manager_invalid_testrrrr�r�r�r�r�r�rP�uint16�uint32r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr	rrrrrr'r)r-r0r�r�r6rr:r<rr rCrGrKrNrSror[r^rbrfrirlrrrwr�r�r�r�r�r��filterwarningsr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrrr!r$r&r(r+r.r1r3r5rrr�r;r?rCrJrMrOrQrTr\r>r_rbrdrgrkrmror_r7r5r$r$4s�
��'�>�-�I��[�[����+�
0�
.�
.�
.�
;�
5�
3�
3�
3�
@�	
��(�[�[���]�T�2�J�7�H�8�)�*H�5�.�-�
	.�$�L(��[�[���]�T�4��,E�F�#2�G�#2�J�[�[���[�2�6�6�5��<�*@�A�F�B�F��[�[����U���[�[���W�t�U�2�Y�&7�8� �9�	�
 �8�(�
�[�[���V�%8�9�+�:�+�
	%�4�1�1�1�5�1��[�[���W�&K�L� �M� ��[�[������V��3�Z�
�*�Z���=�
>�
�*�Z����N�
O��A�Q�'�
(�	
�	�1�	�1�#�,�,�1�7�
7�&�:"�$1�1�,1�;�B,�
Q1�f1�'�D��[�[��������q��N���(�!��a��!�!��a��!�
	
�
�.�
�.�1�3�%�H�� �'�'��[�[�����z�1��>��z�1�-��G�Q�/���1�3�7��$�u�+���)���q�!��	
�
'���4��(�4�
*�,�E�$1�
4��[�[�����B�H�H�a�S��	�	�*��B�H�H�a�S��	�	�*��B�H�H�a�S��	�	�*�
�R�Y�Y�q�\�N�
�R�Y�Y�q�\�N�
�R�Y�Y�q�\�N�
	
�
�"�
�"�
=�*'�X>�,�
>��!�&�*�,�#�(1�41�*7� �'�>#� :�!�!�!�-*�^8�
	A�?�.�
@��[�[���[�2�8�8�R�Z�Z�*@�A��[�[���V�c�3�Z�0��[�[���V�%K�L�1�M�1�B�1�*�[�[���U�%:�C�����$N�O�1�P�1�1��[�[���3�m�]�5S�T�F�U�F��[�[����T�2�8�8�,�6�;L�2M���1��1��[�[����T�2�8�8�,�6�;L�2M���'��'�,�8�[�[����T�2�8�8�,�6�;L�2M���+��+��[�[���D��E��F��'�	,�1�&1�1�1� �[�[���W�q�"�&�&�$��e��&E�F�
1�G�
1�;�.1�1��
 �
1��[�[��� M�N�*�O�*�$6�,J#�Z,��1�#�)�(�.�>�[�[�����z�2�.��G�R�0���B�S�9�	
�

'���1��1�"�[�[�����z�2�.��G�R�0���B�S�9�	
�

'���'��'��[�[���W�r�}�}�b�n�n�&E�F�	$�G�	$��[�[���V�%U�V��[�[���V�c�3�Z�0�
*�1�W�
*��[�[���W�&A�B�1�C�1�$�<1��[�[���V�d�E�]�3�:�4�:�0?�1��[�[����
�R�]�]�<�
(�-�"�-�-��*E�F�
�<�(�	
��1��1�1�1�+�1�1�"1�$1�1�$�*�1�1�1�*�1��[�[���H���
1��
1��[�[���H���
1��
1��[�[���A���[�[���V�f�i�����%I�J�C�K��C�(1�D�
�[�[���U�Q��H�-�1�.�1��[�[���U�Q��H�-�
1�.�
1�
1�	1�-�.��[�[���Z�$�������)>�?�.�@�.�.�.�1�-�1�*r7r$c�h�eZdZd�Zej
j
ddeje	e
g�ej
j
dded�g�d���Zej
jed�	�ej
j
dgd
�ddejgg�d
���Zy)�"TestSeriesConstructorIndexCoercionc��tdd��}ttjj	d�jt
|��|jt��}t|jt�rJ�y)Nr�r�r�r�)rrr*r�r�r�rwr,rAr�rWr)r0rFr;s   r5�3test_series_constructor_datetimelike_index_coercionzVTestSeriesConstructorIndexCoercion.test_series_constructor_datetimelike_index_coercions]����q�1����I�I�!�!�!�$�4�4�S��X�>��
�
�6�@R�
��
�c�i�i��7�7�7�7r7�	containerNrlrr�c��gd�gd�g}|�|D�cgc]
}||���}}t||��}t|jt�sJ�ycc}w)N)r�r�r�r�)r�r�r�r�rV)rr�rWr)r0ryrl�indexes�ind�multis      r5�(test_series_constructor_infer_multiindexzKTestSeriesConstructorIndexCoercion.test_series_constructor_infer_multiindex�sQ��(�)=�>��� �18�9�#�y��~�9�G�9��t�7�+���%�+�+�z�2�2�2��:s�A
z/StringDType only available in numpy 2 and aboverTr-r�r�c���ddlm}tj||���}t	|�}|j
tjk(sJ�||k(j�sJ�y)Nr)�StringDTyper()�numpy.dtypesr�r*rPrr)r�r9)r0rlr�r�r3s     r5� test_np_string_array_object_castzCTestSeriesConstructorIndexCoercion.test_np_string_array_object_cast�sN��	-��h�h�t�;�=�1���S�k���y�y�B�J�J�&�&�&��t�� � �"�"�"r7)r�r�r�rxrMrnrpr*rPrrr�r~�skipifrr�r�r_r7r5rvrv~s���8��[�[���[�4����6�5�*I�J��[�[���V�c�5��8�_�5�3�6�K�3��[�[�����#T����[�[�����
�#�r�v�v��	
��#���#r7rvc�Z�eZdZd�Zej
d��Zej
d��Zy)�TestSeriesConstructorInternalsc��tgd��}t|j�}tj||�|sOt	|j
jdt�sJ�|j
jdjsJ�yy)Nr�r)	rrPr-rBr�r�r�r"�
is_numeric)r0�using_array_managerr;rxs    r5� test_constructor_no_pandas_arrayz?TestSeriesConstructorInternals.test_constructor_no_pandas_array�so���Y�����	�	�"��
���s�F�+�"��f�k�k�0�0��3�Z�@�@�@��;�;�%�%�a�(�3�3�3�3�#r7c�&�ttjddgd���}|jjdj
dusJ�ttjdgd���}|jjdj
dusJ�y�	N�1h�2hr�r(rF�2015rL)rr�rPr�r��is_extensionr�s  r5�test_from_arrayz.TestSeriesConstructorInternals.test_from_array�sz������$���5F�G�H���{�{�!�!�!�$�1�1�U�:�:�:�����&��1A�B�C���{�{�!�!�!�$�1�1�U�:�:�:r7c���tddgd��}|jjdjdusJ�tdgd��}|jjdjdusJ�yr�)rr�r�r�r�s  r5�test_from_list_dtypez3TestSeriesConstructorInternals.test_from_list_dtype�sh����t��,=�>���{�{�!�!�!�$�1�1�U�:�:�:����(8�9���{�{�!�!�!�$�1�1�U�:�:�:r7N)r�r�r�r�r�rqr�r�r_r7r5r�r��s;��4��'�'�;�(�;��'�'�;�(�;r7r�c�d�|}t|t�sJ�t|jt�sJ�yrc)r�rrWr)�(rand_series_with_duplicate_datetimeindex�dupss  r5r�r��s+��3�D��d�F�#�#�#��d�j�j�-�0�0�0r7zinput_dict,expectedr(r�r>c�n�tjt|�g�}tj||�yrc)r*rPrr-rU)�
input_dictr4rxs   r5�test_numpy_arrayr��s*���X�X�v�j�)�*�
+�F������1r7c���tddg�}tddg|j���}tddgtjddg���}tj||�y)N)�r��r�r�r>)�)r�Nr�r�r>r�rVr�r�)rrrdrr�r-rB)�param_indexrFr4s   r5�test_index_ordered_dict_keysr��sn���)�*�	
��K��Q��F�+�"2�"2�"4�
5�F��	
�A���$�$�
%�'@�A�
��H����6�8�,r7�
input_listr�r�y�?�?y@@c��t|�}t|j�}|jdk(sJ�tj||�y)N�
complex128r#)r�r;rxs   r5�test_series_with_complex_nanr��s>����
�C�
�C�I�I�
�F��9�9��$�$�$����3��'r7)B�collectionsr�collections.abcrrr�dateutil.tzr�numpyr*rrM�pandas._libsr	r
�pandas.compat.numpyr�
pandas.errorsr�pandas.util._test_decorators�util�_test_decoratorsr��pandas.core.dtypes.dtypesr
�pandasr�rrrrrrrrrrrrrrrrr�pandas._testing�_testingr-�pandas.core.arraysrr r!�pandas.core.internals.blocksr"r$rvr�r�rnrprPr�rAr�r��complexr�r_r7r5�<module>r�sb��#�$��
!���
��/�,�)�)�6�������&���
4�G!*�G!*�TB%#�%#�P;�;�41�������
�Q������A�3�%�r�x�x�0�1�

�s��X�R�X�X��u�g�V�4�5�
�Q������A�3�%�r�x�x�0�1���2��2�
-�&������	
�G�E�N�A��	�����(���(��(r7

Youez - 2016 - github.com/yon3zu
LinuXploit