
    MhD                       % S SK Jr  S SKJr  S SKrS SKrS SKJr  S SKJ	r	J
r
JrJr  S SKrS SKrS SKJrJrJr  S SKJr  S SKJr  S SKrS S	KJrJrJrJrJrJr  S S
K J!r!J"r"J#r#J$r$  S SK%J&r&J'r'  S SK(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?  S SK@JArAJBrB  S SKCJDrDJErEJFrFJGrGJHrHJIrIJJrJ  S SKKJLrLJMrMJNrN  S SKOJPrP  S SKQJRrR  \	(       a  S SKSJTrTJUrU  S SKKJVrV  / SQrWS\XS'   / SQrYS\XS'   \ZSSSS/r[S\XS'   / SQr\S\XS '   \W\[-   r]\Y\\-   r^/ \]Q\^Qr_S\XS!'   \`S"S#/raS\XS$'   S%S&/rbS\XS''   / \aQ\bQrcS\XS('   \dS)S*/reS\XS+'   \fS,S-/rgS\XS.'   / \eQ\aQrhS\XS/'   S0S1/riS\XS2'   S3S4/rjS\XS5'   \kS6/rlS\XS7'   \mS8/rnS\XS9'   \oS:/rpS\XS;'   \a\]-   rq\b\^-   rr/ \qQ\rQrsS\XS<'   / \sQ\eQrtS\XS='   \q\e-   \g-   \i-   \j-   \l-   \p-   \n-   ru\R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  /r~\f\Z\`\d\\\\\\\k\m\\/rS>S?S@.\   rS\GR                  \GR                  \`" SA5      \GR                  \" SB5      /r\GR                  \GR                  4 V Vs/ s H  n SC  H  nU " SDU5      PM     M     snn r\(       Gd  S SKr\R                  " 5       \R                  " 5       \R                  " 5       \GR$                  " 5       /r\R                  " 5       \R                  " 5       \R                  " 5       \GR(                  " 5       /r\\-   r\ Vs/ s H  n\f" \" U5      5      PM     snr\R                  " 5       \GR0                  " 5       /r\ Vs/ s H  n\f" \" U5      5      PM     snr\GR6                  " SESF5      /r\GR:                  " 5       /r\GR>                  " 5       /r\GRB                  " SG5      \GRB                  " SH5      \GRD                  " SI5      \GRD                  " SJ5      /r\GRH                  " 5       \GRJ                  " 5       /rSK VVs/ s H  nSL  H  n\GRO                  XSM9PM     M     snnrSK Vs/ s H  n\GRS                  U5      PM     snr\GRV                  " 5       /r\\-   \-   \-   \-   \-   \-   \-   \-   \-   r\\-   rO/ r/ r/ r/ r\a\r-   \-   r/ SNQr/ SOQrScSdSP jjrSQ r " SR SS\5      r " ST SU\5      rSeSV jrSfSW jr\GRp                  GRr                  GRt                  GRw                  5       rSX rSgSY jrSZ rS[ rS\ rS] rS^ rS_ r/ SKQrShS` jrSiSa jr/ SbQrgs  snn f s  snf s  snf s  snnf s  snf )j    )annotations)DecimalN)	byteorder)TYPE_CHECKINGCallableContextManagercast)can_set_localeget_locales
set_locale)pa_version_under10p1)is_string_dtype)
ArrowDtype	DataFrameIndex
MultiIndex
RangeIndexSeries)round_trip_localpathround_trip_pathlibround_trip_picklewrite_to_compressed)assert_produces_warningmaybe_produces_warning)assert_almost_equalassert_attr_equalassert_categorical_equalassert_class_equalassert_contains_allassert_copyassert_datetime_array_equalassert_dict_equalassert_equalassert_extension_array_equalassert_frame_equalassert_index_equal!assert_indexing_slices_equivalentassert_interval_array_equalassert_is_sorted"assert_is_valid_plot_return_objectassert_metadata_equivalentassert_numpy_array_equalassert_period_array_equalassert_series_equalassert_sp_array_equalassert_timedelta_array_equalraise_assert_detail)	get_dtypeget_obj)assert_cow_warningdecompress_fileensure_cleanraises_chained_assignment_errorset_timezoneuse_numexprwith_csv_dialect)BaseMaskedArrayExtensionArrayNumpyExtensionArray)NDArrayBackedExtensionArray)extract_array)DtypeNpDtype)ArrowExtensionArray)uint8uint16uint32uint64zlist[NpDtype]UNSIGNED_INT_NUMPY_DTYPES)UInt8UInt16UInt32UInt64zlist[Dtype]UNSIGNED_INT_EA_DTYPESint8int16int32int64SIGNED_INT_NUMPY_DTYPES)Int8Int16Int32Int64SIGNED_INT_EA_DTYPESALL_INT_DTYPESfloat32float64FLOAT_NUMPY_DTYPESFloat32Float64FLOAT_EA_DTYPESALL_FLOAT_DTYPES	complex64
complex128COMPLEX_DTYPESstrUSTRING_DTYPESCOMPLEX_FLOAT_DTYPESzdatetime64[ns]zM8[ns]DATETIME64_DTYPESztimedelta64[ns]zm8[ns]TIMEDELTA64_DTYPESboolBOOL_DTYPESbytesBYTES_DTYPESobjectOBJECT_DTYPESALL_REAL_DTYPESALL_NUMERIC_DTYPES<>)littlebignanNaN)YMWDhmsmsusnspsfsasNaT      r|   r}   r~   r   )r|   r}   r~   r   )NUTCz
US/Pacificz
US/Eastern)unittz)__add____radd____sub____rsub____mul____rmul____floordiv____rfloordiv____truediv____rtruediv____pow____rpow____mod____rmod__)__eq____ne____le____lt____ge____gt__c                H   U[         R                  L aX  [        U [        5      (       a+  [	        [
        R                  " U R                  5      5      n U $ [         R                  " U SS9n  U $ U[        L aE  [        R                  " 5          [        R                  " SS[        S9  [        U 5      n SSS5        U $ U[        L aE  [        R                  " 5          [        R                  " SS[        S9  [        U 5      n SSS5        U $ U[        L a  [        R                  " 5          [        R                  " SS[        S9  [        U 5      R                  5       n SSS5        U(       a%  U R                   n [         R"                  " U /S-  SS	9n U $ U[
        R$                  L d  U[
        R                  L a  [
        R                  " U 5      n U $ U[&        L a  ['        U 5      n U $ [)        U5      e! , (       d  f       U $ = f! , (       d  f       U $ = f! , (       d  f       N= f)
z
Helper function to wrap the expected output of a test in a given box_class.

Parameters
----------
expected : np.ndarray, Index, Series
box_cls : {Index, Series, DataFrame}

Returns
-------
subclass of box_cls
F)copyignorezDtype inference)categoryN   T)ignore_index)pdarray
isinstancer   r=   npasarray_valuesr   warningscatch_warningsfilterwarningsFutureWarningr   r   to_frameTconcatndarrayto_arrayNotImplementedError)expectedbox_cls	transposes      J/var/www/html/env/lib/python3.13/site-packages/pandas/_testing/__init__.pybox_expectedr     s    "((h
++*2::h6F6F+GHH8 O5 xxu5H4 O3 
E	$$&##H.?-XXH '0 O+ 
F	$$&##H.?-Xh'H '( O# 
I	$$&##H.?-Xh'002H ' 
  zzHyy(adCH O 
BJJ	'RXX"588H%
 O	 
H	H% O "'**/ '&0 O) '&( O! '&s$   
&G/&H&4H/
G>
H
H!c                b    [        U SS5      nUc  [        R                  " U 5      $ [        U SS9$ )zI
Similar to pd.array, but does not cast numpy dtypes to nullable dtypes.
dtypeNT)extract_numpy)getattrr   r   r?   )objr   s     r   r   r   D  s2    
 C$'E}zz#D11    c                  <    \ rS rSrSS/r\S 5       r\S 5       rSrg)SubclassedSeriesiQ  testattrnamec                    S $ )Nc                     [        U 0 UD6$ Nr   argskwargss     r   <lambda>/SubclassedSeries._constructor.<locals>.<lambda>[      '7'H'Hr    selfs    r   _constructorSubclassedSeries._constructorT  s     IHr   c                    S $ )Nc                     [        U 0 UD6$ r   SubclassedDataFramer   s     r   r   9SubclassedSeries._constructor_expanddim.<locals>.<lambda>_      ':D'KF'Kr   r   r   s    r   _constructor_expanddim'SubclassedSeries._constructor_expanddim]      KKr   r   N)	__name__
__module____qualname____firstlineno__	_metadatapropertyr   r   __static_attributes__r   r   r   r   r   Q  s6    V$II I L Lr   r   c                  :    \ rS rSrS/r\S 5       r\S 5       rSrg)r   ib  r   c                    S $ )Nc                     [        U 0 UD6$ r   r   r   s     r   r   2SubclassedDataFrame._constructor.<locals>.<lambda>g  r   r   r   r   s    r   r    SubclassedDataFrame._constructore  r   r   c                    S $ )Nc                     [        U 0 UD6$ r   r   r   s     r   r   9SubclassedDataFrame._constructor_sliced.<locals>.<lambda>k  r   r   r   r   s    r   _constructor_sliced'SubclassedDataFrame._constructor_slicedi  s    HHr   r   N)	r   r   r   r   r   r   r   r   r   r   r   r   r   r   b  s3    IL L I Ir   r   c                J    [         R                  nUR                  U 5      U-   $ )a+  
Convert list of CSV rows to single CSV-formatted string for current OS.

This method is used for creating expected value of to_csv() method.

Parameters
----------
rows_list : List[str]
    Each element represents the row of csv.

Returns
-------
str
    Expected output of to_csv() in current OS.
)oslinesepjoin)	rows_listseps     r   convert_rows_list_to_csv_strr   n  s!      **C88I$$r   c                *    SSK nUR                  U SS9$ )z
Helper function to mark pytest.raises that have an external error message.

Parameters
----------
expected_exception : Exception
    Expected error to raise.

Returns
-------
Callable
    Regular `pytest.raises` function with `match` equal to `None`.
r   N)match)pytestraises)expected_exceptionr   s     r   external_error_raisedr     s     ==+4=88r   c           	         / nU H?  u  p4UR                  XU45        U[         VVs/ s H  u  pVXc:X  d  M  XU4PM     snn-  nMA     U$ s  snnf )a}  
Combine frame, functions from com._cython_table
keys and expected result.

Parameters
----------
ndframe : DataFrame or Series
func_names_and_expected : Sequence of two items
    The first item is a name of a NDFrame method ('sum', 'prod') etc.
    The second item is the expected return value.

Returns
-------
list
    List of three items (DataFrame, function, expected result)
)appendcython_table)ndframefunc_names_and_expectedresults	func_namer   funcr   s          r   get_cython_table_paramsr     sg    " G6	H56*
*
  &WH%*
 	
  7 N
s
   A

A

c                   ^ U R                  S5      n [        [        U5      nU$ ! [         a    [        [        USS 5      mU4S jn U$ f = f)z
The operator function for a given op name.

Parameters
----------
op_name : str
    The op name, in form of "add" or "__add__".

Returns
-------
function
    A function performing the operation.
_   Nc                   > T" X5      $ r   r   )xyrops     r   r   "get_op_from_name.<locals>.<lambda>  s	    #a)r   )stripr   operatorAttributeError)op_nameshort_opnameopr  s      @r   get_op_from_namer    sY     ==%L$X|, I  $hQR 01#I$s   & #AAc                    U $ r   r   r  s    r   getitemr        Hr   c                    U $ r   r   r  s    r   setitemr    r  r   c                    U R                   $ r   )locr  s    r   r  r        55Lr   c                    U R                   $ r   )ilocr  s    r   r  r    s    66Mr   c                    U R                   $ r   )atr  s    r   r  r    s    44Kr   c                    U R                   $ r   )iatr  s    r   r  r    r  r   c                b    [         R                  U 5      [         R                  U5      :  a  U $ U$ )z*
Find the higher of two datetime64 units.
)_UNITSindex)leftrights     r   get_finest_unitr$    s(     ||DV\\%00Lr   c                   [        U [        R                  5      (       a5  [        U[        R                  5      (       a  [        R                  " X5      $ [        U [        R                  5      (       a  [        X5      $ [        U [        5      (       a  g[        U [
        5      (       a  [        U R                  U5      $ [        U [        [        45      (       a  [        U R                  U5      $ [        U [        5      (       a  [        U R                  U5      $ [        U [        R                  R                  R                  5      (       a  [        U R                   U5      $ [        U [        R                  R                  R"                  5      (       a3  [        U R$                  U5      =(       d    [        U R&                  U5      $ [        U [(        5      (       a  [+        U R,                  5      (       a  U R,                  R.                  S;   a  [1        SU 5      n [        U[(        5      (       a  [+        UR,                  5      (       a  UR,                  R.                  S;   al  [1        SU5      nU R2                  nUR2                  nUR5                  S5      R7                  5       S   nUR5                  S5      R7                  5       S   nXE:H  $ [        U [8        5      (       ar  [        U[8        5      (       a]  [        R                  " U R:                  UR:                  5      =(       d+    [        R                  " U R<                  UR<                  5      $ [        U [>        5      (       aG  [A        U RB                  R                  5      S:X  a$  U RB                  R                  S   n[        Xa5      $ [E        [G        U 5      [G        U5      5      e)z%
Pandas-compat for np.shares_memory.
F)pyarrowpyarrow_numpyrB   r   r  )$r   r   r   shares_memoryr   r   _codesr   r   r   r>   _ndarrayr   corearraysSparseArray	sp_valuesIntervalArray_left_rightr<   r   r   storager	   	_pa_arraychunkbuffersr;   _data_maskr   len_mgrr   type)r"  r#  left_pa_dataright_pa_data	left_buf1
right_buf1arrs          r   r(  r(    s    $

##
5"**(E(E,,	D"**	%	%U))$
##$
##T[[%00$((T\\511$344T]]E22$2233T^^U33$4455TZZ/T=e3TT 	4((DJJ''JJ">> )40un--,,##'CC.6E>>L!OOM$**1-557:I&,,Q/779!<J**$((Z-O-O 

EKK8 
B<L<LJJ=
 	
 $	""s499+;+;'<'Aiiq!S((
d4j$u+
66r   )NALL_INT_EA_DTYPESALL_INT_NUMPY_DTYPESALL_NUMPY_DTYPESALL_REAL_NUMPY_DTYPESr   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r   r.   r/   r0   r4   r  ri   r   rk   r
   ra   r   rf   r5   ENDIANr6   r   r]   rZ   r   r2   r  r   r$  r3   r  r  r  r  r   NARROW_NP_DTYPESNP_NAT_OBJECTSNULL_OBJECTSrm   r1   r7   r   r   r   r  r   r8   r(  rV   rQ   rd   r   r   rg   r   rL   rG   r9   r:   r   )T)r   rh   )r   z	list[str]returnrb   )r   ztype[Exception]rH  r   )r  rb   rH  r   )r"  rb   r#  rb   )rH  rh   )
__future__r   decimalr   r
  r   sysr   typingr   r   r   r	   r   numpyr   pandas._config.localizationr
   r   r   pandas.compatr   pandas.core.dtypes.commonr   pandasr   r   r   r   r   r   r   pandas._testing._ior   r   r   r   pandas._testing._warningsr   r   pandas._testing.assertersr   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   pandas._testing.compatr2   r3   pandas._testing.contextsr4   r5   r6   r7   r8   r9   r:   pandas.core.arraysr;   r<   r=   pandas.core.arrays._mixinsr>   pandas.core.constructionr?   pandas._typingr@   rA   rB   rG   __annotations__rL   intrQ   rV   rA  r@  rW   floatrZ   r]   r^   complexra   rb   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rC  ALL_REAL_EXTENSION_DTYPESrn   ro   rB  float16rX   rM   rN   rO   rC   rD   rE   rE  listtuplerangedictset	frozenset	bytearray
memoryviewPYTHON_DATA_TYPESrD  rt   r   NArG  
datetime64timedelta64rF  r&  parF   UNSIGNED_INT_PYARROW_DTYPESrP   SIGNED_INT_PYARROW_DTYPESALL_INT_PYARROW_DTYPESALL_INT_PYARROW_DTYPES_STR_REPRrY   FLOAT_PYARROW_DTYPESFLOAT_PYARROW_DTYPES_STR_REPR
decimal128DECIMAL_PYARROW_DTYPESstringSTRING_PYARROW_DTYPESbinaryBINARY_PYARROW_DTYPEStime32time64TIME_PYARROW_DTYPESdate32date64DATE_PYARROW_DTYPES	timestampDATETIME_PYARROW_DTYPESdurationTIMEDELTA_PYARROW_DTYPESbool_BOOL_PYARROW_DTYPESALL_PYARROW_DTYPES ALL_REAL_PYARROW_DTYPES_STR_REPRALL_REAL_NULLABLE_DTYPESarithmetic_dunder_methodscomparison_dunder_methodsr   r   r   r   r   r   r+  common_cython_tableitemsr   r   r  r  r  r  r  r  r  r   r$  r(  __all__)clsr   typr   s   0000r   <module>r     sU   "   	      / 5         2   
 C 2
 7+R = R&M  M*-vw)Q  Q$G k G03JJ *-AA I 4I7HI I%*Iy$A M A )95 5 G"4 G G + G&\B B!5#.{ .$Jn$J7I$J k J"2H!= ; =#4h"? K ? &>[ )"G,k ,$h/{ /*-AA +.?? S!6S9RS S"EO"En"E K E   	
     JJJJGGHHHHHHIIII	  				 " 	$Y	/bffbffeElBEE75>J r~~.. t .( #%88:ryy{BIIK"U!#BHHJ
BHHJ O8;TT(>'(>JsO(>'# JJL"**,7(<%(<JsO(<%! !mmAq12YY[MYY[M 			#
		$
		$
		$	 99;		4 ,+D;B 	$&; 	'+
 ?VV>UdD 1>UV88:,
 	
	
 	!  	   		 
 	 	 "	" #	# 		  	(*GG % %'!&(#')$ 225UU  " Y ,^
2Lv L"	I) 	I%(9& ww~~++1138: 
!67rOM4'%
  Ws   U/U5U:$U?9V