gL iddlmZddlZddlmZmZmZmZddlZ ddl m Z ddl m Z ddlmZddlmcmZddlmZddlmZmZmZmZmZmZdd lmZmZm Z m!Z!dd l"m#Z#ddl$Z%dd l$m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0dd l1m2Z2m3Z3m4Z4m5Z5m6Z6dd l7m8Z8ddl9m:Z:ddl;mZ>erddl?m@Z@ d2 d3dZAd4dZBd5d6dZC d7 d8dZD d9 d:dZEd;ddZI d? d@dZJdAdBdZK dC dDdZL dE dDd ZM dF dGd!ZN dH dId#ZOdde je je jd$f dJd%ZQdddde jd"dddde je jd&f dd"d' dKd(ZRdddddd"e jd"dd"dde je jd)f dLd*ZSd4d+ZTd4d,ZUd4d-ZVd4d.ZW dMd/ZXdNd0ZY dO dPd1ZZy)Q) annotationsN) TYPE_CHECKINGLiteralNoReturncast)lib)is_matching_na) SparseIndex)compare_mismatched_resolutions)is_boolis_float_dtypeis_integer_dtype is_numberis_numeric_dtypeneeds_i8_conversion)CategoricalDtypeDatetimeTZDtypeExtensionDtype NumpyEADtype)array_equivalent) Categorical DataFrame DatetimeIndexIndex IntervalDtype IntervalIndex MultiIndex PeriodIndex RangeIndexSeriesTimedeltaIndex) DatetimeArrayExtensionArray IntervalArray PeriodArrayTimedeltaArray)DatetimeLikeArrayMixin) StringDtype)safe_sort_index) pprint_thing)DtypeObjequivc  t|trt||fd|||d|yt|trt ||fd|||d|yt|t rt ||fd|||d|y|rut|r t|rn^t|r t|rnGt|tjst|tjrd}nd}t|||tj||ft|||d|y) a Check that the left and right objects are approximately equal. By approximately equal, we refer to objects that are numbers or that contain numbers which may be equivalent to specific levels of precision. Parameters ---------- left : object right : object check_dtype : bool or {'equiv'}, default 'equiv' Check dtype if both a and b are the same type. If 'equiv' is passed in, then `RangeIndex` and `Index` with int64 dtype are also considered equivalent when doing type checking. rtol : float, default 1e-5 Relative tolerance. atol : float, default 1e-8 Absolute tolerance. F) check_exactexactrtolatol)r. check_dtyper0r1 numpy arrayInputobj)r2r0r1N) isinstancerassert_index_equalr assert_series_equalrassert_frame_equalrr npndarrayassert_class_equal_testingassert_almost_equalbool)leftrightr2r0r1kwargsr6s _/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/_testing/asserters.pyr?r?Bs,6$       D& !   #    D) $   #    9U#375>dBJJ/:eRZZ3P'C!C"4C8 $$ % %)+%6T PV c |j}t||st|d|dt|dt||st|d|dt|dy)a Helper method for our assert_* methods that ensures that the two objects being compared have the right type before proceeding with the comparison. Parameters ---------- left : The first object being compared. right : The second object being compared. cls : The class type to check against. Raises ------ AssertionError : Either `left` or `right` is not an instance of `cls`. z Expected type z, found z insteadN)__name__r7AssertionErrortype)rArBclscls_names rD_check_isinstancerLsv ||H dC juHT$ZL I   eS !juHT%[M J   "rETcVt||ttj|||y)N) compare_keys)rLdictr>assert_dict_equal)rArBrNs rDrPrPs dE4( tUFrEc td} ddfd } t||t| ||| |j|jk7r5| d} |jd|} |jd|}t| | | |t |t |k7r3| d} t |d|} t |d|}t| | | ||st |}t |}t |trtt|}t|jD]}d|d} t|j||j|||||| t|j||j|| |j||j|| n|rÉr|j!|s|j"|j"k7}t |t$j&std |j)d}t%j*|j-t.d zt |z }| d t%j0|d d}t| |||nst |t>r tA|j"|j"r[t |jBtDst |jBtDr&tG|j"|j"| dyyy#t$r:|j|}|j|}t||||||| YJwxYw)ak Check that left and right Index are equal. Parameters ---------- left : Index right : Index exact : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Index with an int64 dtype as well. check_names : bool, default True Whether to check the names attribute. check_exact : bool, default True Whether to compare number exactly. check_categorical : bool, default True Whether to compare internal Categorical exactly. check_order : bool, default True Whether to compare the order of index entries as well as their values. If True, both indexes must contain the same elements, in the same order. If False, both indexes must contain the same elements, but in any order. rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. obj : str, default 'Index' Specify object name being compared, internally used to show appropriate assertion message. Examples -------- >>> from pandas import testing as tm >>> a = pd.Index([1, 2, 3]) >>> b = pd.Index([1, 2, 3]) >>> tm.assert_index_equal(a, b) Tc6syt|||td|||t|jtrNt|jtr4r1td|||t |j |j ytd|||y)N)r/r6 inferred_typer5dtype)r/)r=assert_attr_equalr7rTrr8 categories)rArBr6check_categoricalr/s rD _check_typesz(assert_index_equal.._check_typess 4e=/4C@ djj"2 3 KK)9 !!'4C@"4??E4D4DER '4C8rEr5z levels are different, z length are differentzMultiIndex level [])r/ check_namesr.rWr0r1r6r#Y@ values are different ( %))r0r1r2r6lobjrobjnamesrT categoryN)rr6strreturnNone)$rLrnlevelsraise_assert_detaillenr)r7rrranger8levelsassert_numpy_array_equalcodesrHget_level_valuesequals_valuesr;r<fillnasumastypeintroundr@r>r?valuesrUrrassert_interval_array_equalrTrassert_categorical_equal)rArBr/r[r.rW check_orderr0r1r6__tracebackhide__rXmsg1msg2msg3levelr`llevelrlevelmismatchdiffmsg exact_bools ` ` rDr8r8s~`9&dE5)u#& ||u}}$+,,,r$(--5'*CtT2 4yCJ+,d)Btf%e*Rw'CtT2 t$&$ #Z'4<<( KE'wa0D "KK&LL' + +&7 )E):EKK.repr_classhs! a HAwrEcHt|tuxst|tS)zClasses that are a RangeIndex (sub-)instance or exactly an `Index` . This only checks class equivalence. There is a separate check that the dtype is int64. )rIrr7r)idxs rDis_class_equivz*assert_class_equal..is_class_equivos CyE!@ZZ%@@rENr,z classes are different)rrrfr@)rIri)rArBr/r6r{rrrs rDr=r=`si  A DzT%[   $ N5$9  E' (CS*T"2Ju4EFrEcDd}t||}t||}||us t||ry ||k(}|tju|tjuz rd}n t |t s|j}|sd|d}t||||y#t$rd}YlwxYw)aO Check attributes are equal. Both objects must have attribute. Parameters ---------- attr : str Attribute name being compared. left : object right : object obj : str, default 'Attributes' Specify object name being compared, internally used to show appropriate assertion message TNFz Attribute "z" are different) getattrr TypeErrorpdNAr7r@allri) attrrArBr6r{ left_attr right_attrresultrs rDrUrUsd#I%JJ.J"Gj( RUUzRUU23  % D61Ci<  sB BBcddlm}ddlm}t |t t jfrlt |t r |j}|jD]<}dtt|j}t ||tfr7J|ydtt|j}t ||ttfsJ|y)Nr)Artist)AxeszBone of 'objs' is not a matplotlib Axes instance, type encountered zoobjs is neither an ndarray of Artist instances nor a single ArtistArtist instance, tuple, or dict, 'objs' is a )matplotlib.artistrmatplotlib.axesrr7r r;r<rqravelreprrIrGrOtuple)objsrrelrs rD"assert_is_valid_plot_return_objectrs($$,- dF #< b4,/ 4 4/  5 BDJ''() + $ 56;;6rEct|ttfr |j}t|tj r3t |t jt j|yt|||jy)z#Assert that the sequence is sorted.N) r7rr rwr;r<rmsortarrayassert_extension_array_equalargsort)seqs rDassert_is_sortedrsW#v'jj#rzz" bggbhhsm&<=$S#ckkm*<=rEct||tt|jtst|jtrd}nd}|rMt |j|j|d|t |j|j||dn |jj}|jj}t |||d|t |jj|j|jj|j|d|td||| y #t$r|j|j}}YwxYw) a} Test that Categoricals are equivalent. Parameters ---------- left : Categorical right : Categorical check_dtype : bool, default True Check that integer dtype of the codes are the same. check_category_order : bool, default True Whether the order of the categories should be compared, which implies identical integer codes. If False, only the resulting values are compared. The ordered attribute is checked regardless. obj : str, default 'Categorical' Specify object name being compared, internally used to show appropriate assertion message. r,Tz .categories)r6r/z.codesr2r6z.valuesorderedr5N) rLrr7rVrr8rmrn sort_valuesrtakerU)rArBr2check_category_orderr6r/lcrcs rDryrys>2dE;/$//:.* *3 OOU--cU+3Fe  ! JJ SE.  7,,.B!!--/B 2r#k':%H OO  ,    ! !%++ .%w  iu#6 7__e&6&6B 7s4E !E-,E-c.t||ti}|jjjdvrd|d<t |j|jfd|di|t |j |j fd|di|td|||y) a Test that two IntervalArrays are equivalent. Parameters ---------- left, right : IntervalArray The IntervalArrays to compare. exact : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Index with an int64 dtype as well. obj : str, default 'IntervalArray' Specify object name being compared, internally used to show appropriate assertion message mMF check_freqr6z.leftclosedr5N)rLr$_leftrTkind assert_equal_rightrU)rArBr/r6rCs rDrxrxs$dE=1 F zz$$|U[[FUmFvFellH3%u HHhe5rEct||tt|j|j|dt d|||y)N ._ndarrayr5rT)rLr%rm_ndarrayrU)rArBr6s rDassert_period_array_equalr&s7dE;/T]]ENN3%y@QRgtU4rEcd}t||tt|j|j|d|rt d|||t d|||y)NTrr5freqtz)rLr"rmrrUrArBr6rr{s rDassert_datetime_array_equalr-sPdE=1T]]ENN3%y@QR&$37dD%S1rEcd}t||tt|j|j|d|rt d|||yy)NTrr5r)rLr&rmrrUrs rDassert_timedelta_array_equalr9sGdE>2T]]ENN3%y@QR&$37rEcd}|d|}t|trtj|}t|tjr|dt |z }t|tjr t |}nOt|t tfr t|}n-t|trd|jd|jd}t|tjr t |}nOt|t tfr t|}n-t|trd|jd|jd}|d|d|z }||d |z }||d |z }t|) NTz are different z [index]: zStringDtype(storage=z , na_value=)z [left]: z [right]: z [diff]:  ) r7rr;asarrayr<r*rrrr(storagena_valuerH) r6messagerArBr first_diff index_valuesr{rs rDririCsoe  C,&zz,/ , + \,7899$ #D! D+\: ;Dz D+ &&dll^;t}}oQO%$U# E,l; <U  E; '&u}}o[@PPQR   C  D6"" J<    rEFcd}t||t||tjd} | |} | |} |dk(r&| | urMt t | dt | |dk(r&| | ur"t t | dt | d fd } t || s | ||||rFt|tjr+t|tjrtd ||y y y y ) a3 Check that 'np.ndarray' is equivalent. Parameters ---------- left, right : numpy.ndarray or iterable The two arrays to be compared. strict_nan : bool, default False If True, consider NaN and None to be different. check_dtype : bool, default True Check dtype if both a and b are np.ndarray. err_msg : str, default None If provided, used as assertion message. check_same : None|'copy'|'same', default None Ensure left and right refer/do not refer to the same memory area. obj : str, default 'numpy array' Specify object name being compared, internally used to show appropriate assertion message. index_values : Index | numpy.ndarray, default None optional index (shared by both left and right), used in output. Tr5c8t|dd |jS|S)Nbase)rrr5s rD _get_basez+assert_numpy_array_equal.._get_bases"35AsxxJsJrEsamez is not copyz is cj||j|jk7r%td|j|jd}t||D]\}}t|| r|dz }|dz|jz }dt j |dd}t||| t|) Nz shapes are differentr strict_nanr\r]r^r_)r)shaperiziprsizer;rvrH) rArBerr_msgrleft_arr right_arrrrr6rs rD_raisez(assert_numpy_array_equal.._raises ?zzU[[(#C5 56 EKKD'*4'7 #)') SAID  %<$))+DE0$1B0C3GC S$L QW%%rErrTNrfr) r=rLr;r<rHrrr7rU) rArBrr2r check_samer6rr{r left_base right_basers ` `` rDrmrmos>tU,dE2::.K$I5!JV J & DO#4HT*=Mt!|j"|j"t$j&j)ry t+tj,|j.tj,|j.|| y tj,|j1} tj,|j1} t+| | |d |t |jt2r|jj4dk(rp|jj6tj8urJtj(|j"| D cgc]} tj:| c} sJdt |jt2r|jj4dk(rp|jj6tj8urJtj(|j"| D cgc]} tj:| c} sJd|| j=t>} || j=t>}|rt+| |||y tAjB| |tE|||||y cc} wcc} w)a Check that left and right ExtensionArrays are equal. Parameters ---------- left, right : ExtensionArray The two arrays to compare. check_dtype : bool, default True Whether to check if the ExtensionArray dtypes are identical. index_values : Index | numpy.ndarray, default None Optional index (shared by both left and right), used in output. check_exact : bool, default False Whether to compare number exactly. .. versionchanged:: 2.2.0 Defaults to True for integer dtypes if none of ``check_exact``, ``rtol`` and ``atol`` are specified. rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. obj : str, default 'ExtensionArray' Specify object name being compared, internally used to show appropriate assertion message. .. versionadded:: 2.0.0 Notes ----- Missing values are checked separately from valid values. A mask of missing values is computed for each and checked to match. The remaining all-valid values are cast to object dtype and checked. Examples -------- >>> from pandas import testing as tm >>> a = pd.Series([1, 2, 3, 4]) >>> b, c = a.array, a.array >>> tm.assert_extension_array_equal(b, c) Fh㈵>:0yE>zleft is not an ExtensionArrayzright is not an ExtensionArrayrTAttributes of r5rrN)rr6z NA mask)r6rpythonzwrong missing value sentinels)rT)r2r0r1r6r)#r no_defaultrrTr r7r#rUr'rIrr;rrunit datetime_datar roperatoreqrrmrasi8isnar(rrnanisnanto_numpyobjectr>r?r@)rArBr2rr.r0r1r6l_unitr_unitleft_naright_naval left_valid right_valids rDrrsh s~~% CNN " CNN " TZZ ( /"4::.. 0 ,0"5;;//   & s~~-46Ds~~-46D dN +L-LL + e^ ,N.NN ,'4nSE4JK 4/0 u4 5 K4: %tzz$6djj"((3otzz:??))$**5a8ekk2884ou{{;@@))%++6q9& 2MM5>>8;;#% ! JJtyy ! JJuzz "%  jj%Gzz%**,'H#h/l 4::{+ JJ  ( * JJ  266 )vv&*mmG&< =sRXXc] =  + * +  5;; , KK  8 + KK BFF *vv&+nnX&> ?sRXXc] ?  + * + wh((v(6J "++&+9K  <  $$  [)% % > @s SSr ) check_index check_likec  d}|tjurdn|}|tjur| tjuro| tjur]t|jxrt |j xs-t|jxrt |j }n|tjurd}| tjur| nd} | tjur| nd} |s |r t dt ||t|rt|||t|t|k7rBt|d|j}t|d|j}t|d||| rK|j|jk(s2Jt|jd t|j|r-t|j|j||||| | | |d  |r|j|}| rnt!|jt"t$frN|j}|j}|j&|j&k(sJ|j&|j&f|rIt!|jt(rt!|jt(r|snt+d ||d ||r|j,}|j,}t!|t.r5t!|t.r%t1||||jt3|nb||}}t!|t.r|j5}t!|t.r|j5}t7|||t3||jn|rt9|jst9|jr`t;|j,j=t;|j,sd|j,d|j,d}t?|t!|jt@r>> from pandas import testing as tm >>> a = pd.Series([1, 2, 3, 4]) >>> b = pd.Series([1, 2, 3, 4]) >>> tm.assert_series_equal(a, b) TFrrz0check_like must be False if check_index is Falser5rYzSeries length are different != .indexr/r[r.rWrzr0r1r6rTr)r2rr6)r2r6rzatetimelike_compat=True] z is not equal to .)r0r1r2r6r)r0r1r2rr6namerc)r6rN))rrrrTr ValueErrorrLr r=rjindexriflagsrr8 reindex_liker7rr!rrrUrqr#rrerrmrrrprHrrxrr>r?r@r0is_extension_array_dtype_and_needs_i8_conversionry)rArBr2check_index_typecheck_series_typer[r.check_datetimelike_compatrWrr check_flagsr0r1r6rrr{check_exact_indexr|r}lidxridx left_values right_valueslvrvrs rDr9r9Ss~Z!,!>Ks~~% CNN " CNN " TZZ ( /"4::.. 0 ,0"5;;//   & s~~-46Ds~~-46D :KLLdE6*4C0 4yCJd)Btzzl+e*R }-C!>dKzzU[[(VT$**-=,>d4 CTBU*VV( JJ KK"#)/&%v   'jm^-LMzz{{yyDII%= 499'==% tzz#3 45;;(89%  gtU.8N Oll }} k> 2z .8  )'!ZZH  !,B+~6 ))+,7!**, $'H!ZZ   #DJJ'+>u{{+KT\\"))% *>?-dll^<##(==/4 !% % DJJ .: ]4 $DJJ < DJJ 0 1Z %6 $$ LL MM[)C  DJJ /J ^5 % LL MM#C  : EKK  9%++tzz R$ LL MM#C   TZZ (-@-M$ LL MM#C   $$ LL MM[)C &$37 djj"2 3z KK)8  %  e9%%9  8 rErcd}|tjur|nd}|tjur|nd}|tjur|nd}t||t|rt |t |sJ|j |j k7r9t||dt|j t|j | rK|j|jk(s2Jt|jdt|jt|j|j|||| | |||d t|j|j|||| | |||d  | r|j|}|r|j}|j}tt!t|j#t|j#zD]#}||vsJ||vsJt%|||||| %yt'|jD]M\}}|j)|d }|j)|d }t+||||||| | | |d |d|d||ddOy)a Check that left and right DataFrame are equal. This function is intended to compare two DataFrames and output any differences. It is mostly intended for use in unit tests. Additional parameters allow varying the strictness of the equality checks performed. Parameters ---------- left : DataFrame First DataFrame to compare. right : DataFrame Second DataFrame to compare. check_dtype : bool, default True Whether to check the DataFrame dtype is identical. check_index_type : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. check_column_type : bool or {'equiv'}, default 'equiv' Whether to check the columns class, dtype and inferred_type are identical. Is passed as the ``exact`` argument of :func:`assert_index_equal`. check_frame_type : bool, default True Whether to check the DataFrame class is identical. check_names : bool, default True Whether to check that the `names` attribute for both the `index` and `column` attributes of the DataFrame is identical. by_blocks : bool, default False Specify how to compare internal data. If False, compare by columns. If True, compare by blocks. check_exact : bool, default False Whether to compare number exactly. .. versionchanged:: 2.2.0 Defaults to True for integer dtypes if none of ``check_exact``, ``rtol`` and ``atol`` are specified. check_datetimelike_compat : bool, default False Compare datetime-like which is comparable ignoring dtype. check_categorical : bool, default True Whether to compare internal Categorical exactly. check_like : bool, default False If True, ignore the order of index & columns. Note: index labels must match their respective rows (same as in columns) - same labels must be with the same data. check_freq : bool, default True Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex. check_flags : bool, default True Whether to check the `flags` attribute. rtol : float, default 1e-5 Relative tolerance. Only used when check_exact is False. atol : float, default 1e-8 Absolute tolerance. Only used when check_exact is False. obj : str, default 'DataFrame' Specify object name being compared, internally used to show appropriate assertion message. See Also -------- assert_series_equal : Equivalent method for asserting Series equality. DataFrame.equals : Check DataFrame equality. Examples -------- This example shows comparing two DataFrames that are equal but with columns of differing dtypes. >>> from pandas.testing import assert_frame_equal >>> df1 = pd.DataFrame({'a': [1, 2], 'b': [3, 4]}) >>> df2 = pd.DataFrame({'a': [1, 2], 'b': [3.0, 4.0]}) df1 equals itself. >>> assert_frame_equal(df1, df1) df1 differs from df2 as column 'b' is of a different type. >>> assert_frame_equal(df1, df2) Traceback (most recent call last): ... AssertionError: Attributes of DataFrame.iloc[:, 1] (column name="b") are different Attribute "dtype" are different [left]: int64 [right]: float64 Ignore differing dtypes in columns with check_dtype. >>> assert_frame_equal(df1, df2, check_dtype=False) TrrFz shape mismatchrrrz.columnsrr)axisz .iloc[:, z] (column name="z")) r2rr.r[r rWrr6r0r1rr N)rrrLrr7rIrrirrr8rcolumnsr_to_dict_of_blockslistsetkeysr: enumerate_ixsr9)rArBr2rcheck_column_typecheck_frame_typer[ by_blocksr.r rWrrr r0r1r6r{_rtol_atol _check_exactrblockslblocksrTicollcolrcols rDr:r:^s\.DFE.DFE"-S^^"C;LdE9-$U ,,, zzU[[  C5(T$**-=,>DDUCV zzU[[(VT$**-=,>d4 CTBU*VV(   +"N  e6N    +"N  e8    '**,))+#d7<<>2T',,.5IIJK EG# ##G# ## KS    - FAs99QQ9'D::aa:(D '!1''*C"3%e9QC'7uB?!!  rEc 6d}t|tr[t||fi|t|ttfr7|j |j k(sJ|j |j fyyt|t rt||fi|yt|trt||fi|yt|trt||fi|yt|trt||fi|yt|trt||fi|yt|t rt#||fi|yt|t$rt'||fi|yt|t(j*rt-||fi|yt|t.r|ik(sJ||k(sJy|ik(sJt1||y)aC Wrapper for tm.assert_*_equal to dispatch to the appropriate test function. Parameters ---------- left, right : Index, Series, DataFrame, ExtensionArray, or np.ndarray The two items to be compared. **kwargs All keyword arguments are passed through to the underlying assert method. TN)r7rr8rr!rr r9rr:r$rxr%rr"rr&rr#rr;r<rmrer?)rArBrCr{s rDrr)sc$41&1 d]N; <99 * CTYY ,C C* = D& !D%262 D) $41&1 D- (#D%:6: D+ &!$88 D- (#D%:6: D. )$T5;F; D. )$T5;F; D"** % u77 D# ||u}}||D%(rEct||tjjt |j |j t |jtsJt |jtsJ|j}|j}|j|stdd||n td||td||t |j|jy)z Check that the left and right SparseArray are equal. Parameters ---------- left : SparseArray right : SparseArray zSparseArray.indexzindex are not equal fill_valuerTN) rLrarrays SparseArrayrm sp_valuesr7sp_indexr rprirUto_dense)rArB left_index right_indexs rDassert_sp_array_equalr1RsdE299#8#89T^^U__= dmm[ 11 1 ennk 22 2J..K   [ ) !6 K lD%0gtU+T]]_enn.>?rEc@|D]}||vrJdt|y)NzDid not contain item: )r)iterabledicks rDassert_contains_allr6ss. <Cx;1$q';;xO=PQ@ @ E!&3&! 'rEc<t|txr t|S)z Checks that we have the combination of an ExtensionArraydtype and a dtype that should be converted to int64 Returns ------- bool Related to issue #37609 )r7rr) left_dtype right_dtypes rDrrs j. 1 V6I+6VVrEc|j|}t|j||t|jst|||yy)z_ Check that ser.iloc[i_slc] matches ser.loc[l_slc] and, if applicable, ser[l_slc]. N)ilocr9locrr)serl_slci_slcexpecteds rD!assert_indexing_slices_equivalentrHsB xxH1 CII &CJ1 'rEcr|jD](}t||d}||J|t||dk(r(Jy)z: Check that ._metadata attributes are equivalent. N) _metadatar)rArBrrs rDassert_metadata_equivalentrKsK 5dD$' =; ;'%t44 44 5rE)r,rr)r2bool | Literal['equiv']r0floatr1rMrfrg)rfrg)T)rNr@rfrg)r,TTTTrrr)rArrBrr/ bool | strr[r@r.r@rWr@rzr@r0rMr1rMr6rerfrg)Tr4)r/rNr6rerfrg) Attributes)rrer6rerfrg)TTr)r2r@rr@r6rerfrg)r,r$)r/rLr6rerfrg)r%rd)r"T)r6rerr@rfrg)r&T)NNNr)FTNNr3N)rr@r2rLr6rerfrg) r2rLr.bool | lib.NoDefaultr0float | lib.NoDefaultr1rQr6rerfrg) r2rLrrLrr@r[r@r.rPr r@rWr@rr@rr@r r@r0rQr1rQr6rerr@rr@rfrg) r2rLrrLrrLrr@r[r@rr@r.rPr r@rWr@rr@rr@r r@r0rQr1rQr6rerfrg)r?r+r@r+rfr@)rDr rEslicerFrRrfrgr)rAzDataFrame | SeriesrBzDataFrame | Series | Nonerfrg)[ __future__rrtypingrrrrnumpyr; pandas._libsrpandas._libs.missingr pandas._libs.sparser pandas._libs.testing_libstestingr>pandas._libs.tslibs.np_datetimer pandas.core.dtypes.commonr r rrrrpandas.core.dtypes.dtypesrrrrpandas.core.dtypes.missingrpandasrrrrrrrrrrr r!pandas.core.arraysr"r#r$r%r&pandas.core.arrays.datetimeliker'pandas.core.arrays.string_r(pandas.core.indexes.apir)pandas.io.formats.printingr*pandas._typingr+r?rLrPr8r=rUrrryrxrrrrirmrrr9r:rr1r6r=rrHrKrErDrhsY"/+''J 8    C233' ,3 O )O   O  O  O d 8G "hY hY hY hY hY  hY  hYhY hY hY hY hYX7>G"G03G GD$N<,>!% :7:7 :7 :7  :7|GV6/6@C6 6>5AE 2 29= 2  2BF88:>8 8IM) )^+/ M=M=) M= M= M=f,0(+"%.."%..P )P & P P  P  P  P n,007"(+&+"!%"%.."%..G"%G)G. G  G  G&G $GGGGG G G G"#G$%G& 'G\,00718!(+&+""%.."%..#H)H. H / H  HHH&H $HHHHH H !H" #H$ %HV&)R@B< '$ W W'/ W  W 2BF 5  5%> 5  5rE