
    Pi                     l    d dl Zd dlZd dlmZmZ d dlmZmZm	Z	m
Z
mZmZ d dlmZ  G d d          ZdS )    N)is_complex_dtypeis_extension_array_dtype)NAPeriodSeries	Timedelta	Timestamp
date_rangec                       e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zej                            d
          d             Zd ZdS )TestSeriesDescribec           
          t          g dd          }|                                }t          dd|                                ddddd	gdg d
          }t          j        ||           d S )N)r               int_dataname   r   r   r   r   r   countmeanstdmin25%50%75%maxr   index)r   describer   tmassert_series_equalselfserresultexpecteds       }/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/pandas/tests/series/methods/test_describe.pytest_describe_intsz%TestSeriesDescribe.test_describe_ints   s|    ___:66637799aAq!,MMM
 
 

 	vx00000    c                     t          g dd          }|                                }t          g ddg d          }t          j        ||           d S )N)TTFFF	bool_datar   )r   r   Fr   r   uniquetopfreqr   r   r!   r"   r#   r$   s       r)   test_describe_boolsz&TestSeriesDescribe.test_describe_bools   sk    666[III;6X6X6X
 
 
 	vx00000r+   c                     t          g dd          }|                                }t          g ddg d          }t          j        ||           d S )N)ar5   bcdstr_datar   )r   r   r5   r   r.   r   r2   r$   s       r)   test_describe_strsz%TestSeriesDescribe.test_describe_strs'   si    ...Z@@@NN3U3U3U
 
 
 	vx00000r+   c                    t          t          d          t          d          t          d          t          d          t          d          gd          }|                                }t          d|d	         |                                |d
         |d         |d	         |d         |d         gdg d          }t	          j        ||           d S )Nz1 daysz2 daysz3 daysz4 daysz5 daystimedelta_datar   r   r   r   r   r   r   r   r   )r   r   r!   r   r"   r#   r$   s       r)   test_describe_timedelta64z,TestSeriesDescribe.test_describe_timedelta64/   s    (##(##(##(##(## "	
 	
 	
 A		3q63q63q63q63q6J!MMM
 
 

 	vx00000r+   c                    t          t          dd          t          dd          t          dd          gd          }|                                }t          dd|d         dgdg d	
          }t          j        ||           d S )Nz2020-01Mz2019-12period_datar   r   r   r   r.   r   )r   r   r!   r"   r#   r$   s       r)   test_describe_periodz'TestSeriesDescribe.test_describe_periodB   s    Is##VIs%;%;VIs=S=ST
 
 
 3q61444
 
 

 	vx00000r+   c                    t          d d gt                    }|                                }t          ddt          j        t          j        gt          g d          }t          j        ||           |d d                                         }t          j        ||           t          j        |j        d                   sJ t          j        |j        d                   sJ d S )Ndtyper   r.   rD   r    r   r   )	r   objectr!   npnanr"   r#   isnanilocr%   sr'   r(   s       r)   test_describe_empty_objectz-TestSeriesDescribe.test_describe_empty_objectO   s    D$<v...2626"444
 
 

 	vx0002A2!!
vx000xA'''''xA'''''''r+   c                    |}t          |          }t          ddd          }t          ddd          }t          t          |||          |          }|                                }t          dt          ddd                              |          |                    |          |d         |d         |d         |                    |          g|g d	          }t          j        ||           d S )
N  r   r   tzr   r   r   r   r   r   r   r   r   r   r   )strr	   r   r
   r!   tz_localizer"   r#   )	r%   tz_naive_fixturerQ   r   startendrL   r'   r(   s	            r)   test_describe_with_tzz(TestSeriesDescribe.test_describe_with_tz`   s    #$$$1%%a##:eSR000t<<<$1%%11"55!!"%%!!!## FFF
 
 
 	vx00000r+   c                    dx}}t          ddd          }t          ddd          }t          t          |||          |          }|                                }t          dt          d|          t          d|          t          d	|          t          d|          t          d
|          t          d|          g|g d          }t	          j        ||           d S )NCETrO   r   r   rP   r   z2018-01-03 00:00:00z2018-01-01 00:00:00z2018-01-02 00:00:00z2018-01-04 00:00:00z2018-01-05 00:00:00rR   r   )r	   r   r
   r!   r"   r#   )r%   r   rQ   rV   rW   rL   r'   r(   s           r)   test_describe_with_tz_numericz0TestSeriesDescribe.test_describe_with_tz_numericw   s   r$1%%a##:eSR000t<<</B777/B777/B777/B777/B777/B777 FFF
 
 
 	vx00000r+   c                 d   t          t          dd                    }|                                }t          dt          d          t          d          t          d          t          d          t          d          t          d          gg d	
          }t	          j        ||           d S )N2012r   )periodsz
2012-01-02z
2012-01-01z2012-01-01T12:00:00z2012-01-02T12:00:00z
2012-01-03rR   )r    )r   r
   r!   r	   r"   r#   rK   s       r)   *test_datetime_is_numeric_includes_datetimez=TestSeriesDescribe.test_datetime_is_numeric_includes_datetime   s    :fa00011,'',''/00,''/00,'' GFF
 
 
 	vx00000r+   z.ignore:Casting complex values to real discardsc           
         t          |          rd}nt          |          rdnd }t          ddg|          }|dk    rIt          j        t
          d          5  |                                 d d d            n# 1 swxY w Y   d S |                                }t          dd	|                                dd
d	ddgg d|          }t          j	        ||           d S )NFloat64
complex128r   r   rC   z$^a must be an array of real numbers$)matchg       @g      ?g      ?g      ?g      ?r   )r    rD   )
r   r   r   pytestraises	TypeErrorr!   r   r"   r#   )r%   any_numeric_dtyperD   r&   r'   r(   s         r)   test_numeric_result_dtypez,TestSeriesDescribe.test_numeric_result_dtype   sN    $$566 	REE$45F$G$GQLLTEaV#4555L  !H                    F			 NMM
 
 
 	vx00000s   A;;A?A?c           
         t          dgd          }t          j        d           5  |                                }d d d            n# 1 swxY w Y   t          ddt          dddddgdg d          }t          j        ||           d S )Ng        ra   rC   r   r   r   rE   )r   r"   assert_produces_warningr!   r   r#   r$   s       r)   test_describe_one_element_eaz/TestSeriesDescribe.test_describe_one_element_ea   s    cU),,,'-- 	$ 	$\\^^F	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$2q!Q1%MMM
 
 

 	vx00000s   AAAN)__name__
__module____qualname__r*   r3   r:   r=   rA   rM   rX   r[   r_   rd   markfilterwarningsrh   rk    r+   r)   r   r      s        1 1 11 1 11 1 11 1 1&1 1 1( ( ("1 1 1.1 1 1.1 1 1" [ PQQ1 1 RQ1>
1 
1 
1 
1 
1r+   r   )numpyrG   rd   pandas.core.dtypes.commonr   r   pandasr   r   r   r   r	   r
   pandas._testing_testingr"   r   rq   r+   r)   <module>rw      s               
                     u1 u1 u1 u1 u1 u1 u1 u1 u1 u1r+   