+
    ÏÜ³jMÖ  ã                  ó&  € R t ^ RIHt ^ RIt^ RIt^ RIHtHtHtH	t	H
t
 ^ RIt^ RIt^ RIHtHtHtHt ^ RIHt ^ RIHtHtHtHtHtHtHt ^ RIHt ^ RI H!t! ^ R	I"H#t#H$t$ ^ R
I%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5 ^ RI6H7t7 ^ RI8H9t9H:t:H;t;H<t< ^ RI=H>t>H?t?H@t@HAtAHBtBHCtCHDtD ^ RIEHFtFHGtG ^ RIHHItI ^ RIJHKtLHMtMHNtN ^ RIOHPtP ]'       d5   ^ RIHQtQHRtRHStS ^ RITHUtUHVtVHWtW ^ RIXHYtYHZtZ ]! R]V]U,          ]Z,          R7      t[R R lt\R R lt]R R lt^R]P¾                  R]PÀ                  R]PÂ                  R ]PÄ                  R!]PÆ                  R"]PÈ                  R#]PÊ                  R$]PÌ                  R%]PÎ                  R&]PÐ                  R']PÒ                  R(]PÔ                  R)]PÖ                  R*]PØ                  /tmR+ R, ltnR- R. lto]
R/ R0 l4       tp]
R1 R2 l4       tp]! R34      R4 4       tpR5 R6 ltqR[R7 R8 lltr]ptsR9ttR: R; ltuR\R< R= lltv]! R34      R]R> R? ll4       twR^R@ RA lltxR[RB RC lltyR_RD RE lltzR`RF RG llt{RaRH RI llt|]! RJ4      RbRK RL ll4       t}RcRM RN llt~0 RdmtReRO RP llt€RfRQ RR llt�RS RT lt‚RU RV ltƒRW RX lt„R[RY RZ llt…R# )gzl
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
)ÚannotationsN)ÚTYPE_CHECKINGÚLiteralÚTypeVarÚcastÚoverload)ÚalgosÚ	hashtableÚiNaTÚlib©ÚNA)ÚAnyArrayLikeÚ	ArrayLikeÚ
ArrayLikeTÚAxisIntÚDtypeObjÚTakeIndexerÚnpt)Ú
set_module)Úfind_stack_level)Ú'construct_1d_object_array_from_listlikeÚnp_find_common_type)Úensure_float64Úensure_objectÚensure_platform_intÚis_bool_dtypeÚis_complex_dtypeÚis_dict_likeÚis_dtype_equalÚis_extension_array_dtypeÚis_floatÚis_float_dtypeÚ
is_integerÚis_integer_dtypeÚis_list_likeÚis_object_dtypeÚis_signed_integer_dtypeÚneeds_i8_conversion)Úconcat_compat)ÚBaseMaskedDtypeÚCategoricalDtypeÚExtensionDtypeÚNumpyEADtype)ÚABCDatetimeArrayÚABCExtensionArrayÚABCIndexÚABCMultiIndexÚABCNumpyExtensionArrayÚ	ABCSeriesÚABCTimedeltaArray)ÚisnaÚna_value_for_dtype)Útake_nd)ÚarrayÚensure_wrapped_if_datetimelikeÚextract_array)Úvalidate_indices)ÚListLikeÚNumpySorterÚNumpyValueArrayLike)ÚCategoricalÚIndexÚSeries)ÚBaseMaskedArrayÚExtensionArrayÚT)Úboundc               ó    € V ^8„  d   QhRRRR/# )é   Úvaluesr   Úreturnú
np.ndarray© )Úformats   "ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/pandas/core/algorithms.pyÚ__annotate__rN   r   s   € ÷ K!ñ K!˜ð K! zñ K!ó    c                ód  € \        V \        4      '       g   \        V RR7      p \        V P                  4      '       d    \        \        P                  ! V 4      4      # \        V P                  \        4      '       dJ   \        RV 4      p V P                  '       g   \        V P                  4      # \        P                  ! V 4      # \        V P                  \        4      '       d   \        RV 4      p V P                  # \        V P                  4      '       dm   \        V \        P                   4      '       d&   \        P                  ! V 4      P#                  R4      # \        P                  ! V 4      P%                  RRR7      # \'        V P                  4      '       d   \        P                  ! V 4      # \)        V P                  4      '       d=   V P                  P*                  R
9   d   \-        V 4      # \        P                  ! V 4      # \/        V P                  4      '       d   \        \        P                   V 4      # \1        V P                  4      '       d.   V P#                  R4      p\        \        P                   V4      pV# \        P                  ! V \2        R	7      p \        V 4      # )aD  
routine to ensure that our data is of the correct
input dtype for lower-level routines

This will coerce:
- ints -> int64
- uint -> uint64
- bool -> uint8
- datetimelike -> i8
- datetime64tz -> i8 (in local tz)
- categorical -> codes

Parameters
----------
values : np.ndarray or ExtensionArray

Returns
-------
np.ndarray
T©Úextract_numpyrB   r?   Úuint8F©ÚcopyÚi8©Údtype)rG   é   é   )Ú
isinstancer1   r:   r&   rX   r   ÚnpÚasarrayr*   r   Ú_hasnaÚ_ensure_dataÚ_datar+   Úcodesr   ÚndarrayÚviewÚastyper$   r"   Úitemsizer   r   r(   Úobject)rH   Únpvaluess   & rM   r_   r_   r   sØ  € ô, �fœm×,Ò,ä˜v°TÔ:ˆä�v—|‘|×$Ò$ÜœRŸZšZ¨Ó/Ó0Ð0ä	�F—L‘L¤/×	2Ò	2äÐ'¨Ó0ˆØ�}�}ˆ}ô   §¡Ó-Ð-Ü�zŠz˜&Ó!Ð!ä	�F—L‘LÔ"2×	3Ò	3ô �m VÓ,ˆØ�|‰|Ðä	�v—|‘|×	$Ò	$Ü�fœbŸj™j×)Ò)ä—:’:˜fÓ%×*Ñ*¨7Ó3Ð3ô —:’:˜fÓ%×,Ñ,¨W¸5Ð,ÓAÐAä	˜&Ÿ,™,×	'Ò	'Ü�zŠz˜&Ó!Ð!ä	˜Ÿ™×	%Ò	%ð �<‰<× Ñ  KÔ/ä! &Ó)Ð)Ü�zŠz˜&Ó!Ð!ä	˜&Ÿ,™,×	'Ò	'Ü”B—J‘J Ó'Ð'ô 
˜VŸ\™\×	*Ò	*Ø—;‘;˜tÓ$ˆÜœŸ
™
 HÓ-ˆØˆô �ZŠZ˜¤fÔ-€FÜ˜Ó Ð rO   c               ó(   € V ^8„  d   QhRRRRRRRR/# )rG   rH   r   rX   r   Úoriginalr   rI   rK   )rL   s   "rM   rN   rN   À   s,   € ÷ !,ñ !,Øð!,Ø'ð!,Ø3?ð!,àñ!,rO   c                óþ   € \        V \        4      '       d   V P                  V8X  d   V # \        V\        P                  4      '       g#   VP	                  4       pVP                  WR7      # V P                  VRR7      # )z¿
reverse of _ensure_data

Parameters
----------
values : np.ndarray or ExtensionArray
dtype : np.dtype or ExtensionDtype
original : AnyArrayLike

Returns
-------
ExtensionArray or np.ndarray
rW   FrT   )r[   r/   rX   r\   Úconstruct_array_typeÚ_from_sequencerd   )rH   rX   ri   Úclss   &&& rM   Ú_reconstruct_datarn   À   sn   € ô  �&Ô+×,Ò,°·±ÀÔ1Fàˆä�eœRŸX™X×&Ò&ð ×(Ñ(Ó*ˆð
 ×!Ñ! &Ð!Ó6Ð6ð
 �=‰=˜ Uˆ=Ó+Ð+rO   c               ó    € V ^8„  d   QhRRRR/# )rG   Ú	func_nameÚstrrI   r   rK   )rL   s   "rM   rN   rN   ä   s   € ÷ ñ ¨ð °ñ rO   c                óŒ  € \        V \        \        \        \        P
                  \        34      '       g�   VR8w  d%   \        V R\        V 4      P                   R24      h\        P                  ! V RR7      pVR9   d/   \        V \        4      '       d   \        V 4      p \        V 4      p V # \        P                  ! V 4      p V # )z-
ensure that we are arraylike if not already
úisin-targetszQ requires a Series, Index, ExtensionArray, np.ndarray or NumpyExtensionArray got Ú.F©Úskipna)ÚmixedÚstringúmixed-integer)r[   r0   r3   r/   r\   rb   r2   Ú	TypeErrorÚtypeÚ__name__r   Úinfer_dtypeÚtupleÚlistr   r]   )rH   rp   Úinferreds   && rM   Ú_ensure_arrayliker�   ä   s·   € ô ØÜ	”9Ô/´·±Ô=SÐT÷ò ð
 ˜Ô&äØ�+ð ä˜F“|×,Ñ,Ð-¨Qð0óð ô —?’? 6°%Ô8ˆØÐ;Ô;ä˜&¤%×(Ò(Ü˜f›�Ü<¸VÓDˆFð €Mô —Z’Z Ó'ˆFØ€MrO   Ú
complex128Ú	complex64Úfloat64Úfloat32Úuint64Úuint32Úuint16rS   Úint64Úint32Úint16Úint8rx   rf   c               ó    € V ^8„  d   QhRRRR/# )rG   rH   rJ   rI   z)tuple[type[htable.HashTable], np.ndarray]rK   )rL   s   "rM   rN   rN     s   € ÷ ñ Øðà.ñrO   c                óN   € \        V 4      p \        V 4      p\        V,          pW 3# )zi
Parameters
----------
values : np.ndarray

Returns
-------
htable : HashTable subclass
values : ndarray
)r_   Ú_check_object_for_stringsÚ_hashtables)rH   Úndtyper	   s   &  rM   Ú_get_hashtable_algor’     s+   € ô ˜&Ó!€Fä& vÓ.€FÜ˜FÕ#€IØÐÐrO   c               ó    € V ^8„  d   QhRRRR/# )rG   rH   rJ   rI   rq   rK   )rL   s   "rM   rN   rN   &  s   € ÷ ñ  jð °Sñ rO   c                ó€   € V P                   P                  pVR8X  d!   \        P                  ! V RR7      '       d   RpV# )z€
Check if we can use string hashtable instead of object hashtable.

Parameters
----------
values : ndarray

Returns
-------
str
rf   Fru   rx   )rX   Únamer   Úis_string_array)rH   r‘   s   & rM   r�   r�   &  s:   € ð �\‰\×Ñ€FØ�Ôô ×Ò˜v¨e×4Ó4ØˆFØ€MrO   c               ó    € V ^8„  d   QhRRRR/# )rG   rH   rD   rI   rK   )rL   s   "rM   rN   rN   B  s   € × Ñ �1Ð ˜Ñ rO   c                ó   € R # ©NrK   ©rH   s   &rM   Úuniquer›   A  s   € ÙrO   c               ó    € V ^8„  d   QhRRRR/# )rG   rH   znp.ndarray | SeriesrI   rJ   rK   )rL   s   "rM   rN   rN   D  s   € × :Ñ :Ð&Ð :¨:Ñ :rO   c                ó   € R # r™   rK   rš   s   &rM   r›   r›   C  s   € Ù7:rO   Úpandasc                ó   € \        V 4      # )ay
  
Return unique values based on a hash table.

Uniques are returned in order of appearance. This does NOT sort.

Significantly faster than numpy.unique for long enough sequences.
Includes NA values.

Parameters
----------
values : 1d array-like
    The input array-like object containing values from which to extract
    unique values.

Returns
-------
numpy.ndarray, ExtensionArray or NumpyExtensionArray

    The return can be:

    * Index : when the input is an Index
    * Categorical : when the input is a Categorical dtype
    * ndarray : when the input is a Series/ndarray

    Return numpy.ndarray, ExtensionArray or NumpyExtensionArray.

See Also
--------
Index.unique : Return unique values from an Index.
Series.unique : Return unique values of Series object.

Examples
--------
>>> pd.unique(pd.Series([2, 1, 3, 3]))
array([2, 1, 3])

>>> pd.unique(pd.Series([2] + [1] * 5))
array([2, 1])

>>> pd.unique(pd.Series([pd.Timestamp("20160101"), pd.Timestamp("20160101")]))
array(['2016-01-01T00:00:00.000000'], dtype='datetime64[us]')

>>> pd.unique(
...     pd.Series(
...         [
...             pd.Timestamp("20160101", tz="US/Eastern"),
...             pd.Timestamp("20160101", tz="US/Eastern"),
...         ],
...         dtype="M8[ns, US/Eastern]",
...     )
... )
<DatetimeArray>
['2016-01-01 00:00:00-05:00']
Length: 1, dtype: datetime64[ns, US/Eastern]

>>> pd.unique(
...     pd.Index(
...         [
...             pd.Timestamp("20160101", tz="US/Eastern"),
...             pd.Timestamp("20160101", tz="US/Eastern"),
...         ],
...         dtype="M8[ns, US/Eastern]",
...     )
... )
DatetimeIndex(['2016-01-01 00:00:00-05:00'],
        dtype='datetime64[ns, US/Eastern]',
        freq=None)

>>> pd.unique(np.array(list("baabc"), dtype="O"))
array(['b', 'a', 'c'], dtype=object)

An unordered Categorical will return categories in the
order of appearance.

>>> pd.unique(pd.Series(pd.Categorical(list("baabc"))))
['b', 'a', 'c']
Categories (3, str): ['a', 'b', 'c']

>>> pd.unique(pd.Series(pd.Categorical(list("baabc"), categories=list("abc"))))
['b', 'a', 'c']
Categories (3, str): ['a', 'b', 'c']

An ordered Categorical preserves the category ordering.

>>> pd.unique(
...     pd.Series(
...         pd.Categorical(list("baabc"), categories=list("abc"), ordered=True)
...     )
... )
['b', 'a', 'c']
Categories (3, str): ['a' < 'b' < 'c']

An array of tuples

>>> pd.unique(pd.Series([("a", "b"), ("b", "a"), ("a", "c"), ("b", "a")]).values)
array([('a', 'b'), ('b', 'a'), ('a', 'c')], dtype=object)

A NumpyExtensionArray of complex

>>> pd.unique(pd.array([1 + 1j, 2, 3]))
<NumpyExtensionArray>
[(1+1j), (2+0j), (3+0j)]
Length: 3, dtype: complex128
)Úunique_with_maskrš   s   &rM   r›   r›   G  s   € ôT ˜FÓ#Ð#rO   c               ó    € V ^8„  d   QhRRRR/# )rG   rH   r   rI   ÚintrK   )rL   s   "rM   rN   rN   ´  s   € ÷ ñ ˜ð  sñ rO   c                óÈ   € \        V 4      ^ 8X  d   ^ # \        V 4      p \        P                  ! V P	                  4       P                  R4      4      ^ 8g  P                  4       pV# )a   
Return the number of unique values for integer array-likes.

Significantly faster than pandas.unique for long enough sequences.
No checks are done to ensure input is integral.

Parameters
----------
values : 1d array-like

Returns
-------
int : The number of unique values in ``values``
Úintp)Úlenr_   r\   ÚbincountÚravelrd   Úsum)rH   Úresults   & rM   Únunique_intsrª   ´  sO   € ô ˆ6ƒ{�aÔÙÜ˜&Ó!€Fä�kŠk˜&Ÿ,™,›.×/Ñ/°Ó7Ó8¸AÑ=×BÑBÓD€FØ€MrO   c               ó   € V ^8„  d   QhRR/# )rG   Úmaskúnpt.NDArray[np.bool_] | NonerK   )rL   s   "rM   rN   rN   Ë  s   € ÷ ,ñ ,Ð#?ñ ,rO   c                óæ  € \        V RR7      p \        V P                  \        4      '       d   V P	                  4       # \        V \
        4      '       d   V P	                  4       # T p\        V 4      w  r0V! \        V 4      4      pVf*   VP	                  V 4      p\        WRP                  V4      pV# VP	                  WR7      w  rQ\        WRP                  V4      pVf   Q hWQP                  R4      3# )z?See algorithms.unique for docs. Takes a mask for masked arrays.r›   ©rp   ©r¬   Úbool)
r�   r[   rX   r,   r›   r0   r’   r¥   rn   rd   )rH   r¬   ri   r	   ÚtableÚuniquess   &&    rM   r    r    Ë  sÎ   € ä˜v°Ô:€Fä�&—,‘,¤×/Ò/à�}‰}‹Ðä�&œ(×#Ò#à�}‰}‹Ðà€HÜ+¨FÓ3Ñ€Iá”c˜&“kÓ"€EØ‚|Ø—,‘,˜vÓ&ˆÜ# G¯^©^¸XÓFˆØˆð Ÿ™ V˜Ó7‰ˆÜ# G¯^©^¸XÓFˆØÒÐÐØŸ™ FÓ+Ð+Ð+rO   i@B c               ó$   € V ^8„  d   QhRRRRRR/# )rG   Úcompsr<   rH   rI   únpt.NDArray[np.bool_]rK   )rL   s   "rM   rN   rN   í  s'   € ÷ ^"ñ ^"�ð ^" (ð ^"Ð/Dñ ^"rO   c                óH  € \        V 4      '       g#   \        R\        V 4      P                   R24      h\        V4      '       g#   \        R\        V4      P                   R24      h\	        V\
        \        \        \        P                  34      '       gr   \        V4      p\        VRR7      p\        V4      ^ 8”  dI   VP                  P                  R9   d.   \        V 4      '       g   \!        W4      '       g   \#        V4      pM;\	        V\$        4      '       d   \        P&                  ! V4      pM\)        VRRR7      p\        V RR7      p\)        VRR	7      p\	        V\        P                  4      '       g   VP+                  V4      # \-        VP                  4      '       d   \/        V4      P+                  V4      # \-        VP                  4      '       dB   \1        VP                  4      '       g'   \        P2                  ! VP4                  \6        R
7      # \-        VP                  4      '       d   \+        W1P9                  \:        4      4      # \	        VP                  \<        4      '       d5   \+        \        P>                  ! V4      \        P>                  ! V4      4      # \        V4      \@        8”  d‡   \        V4      ^8:  dw   VP                  \:        8w  db   \B        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       g(   \E        V4      PC                  4       '       d   R pMZR pMV\G        VP                  VP                  4      pVP9                  VRR7      pVP9                  VRR7      p\H        PJ                  pV! W14      # )z˜
Compute the isin boolean array.

Parameters
----------
comps : list-like
values : list-like

Returns
-------
ndarray[bool]
    Same length as `comps`.
zIonly list-like objects are allowed to be passed to isin(), you passed a `Ú`rs   r¯   ÚiufcbT)rR   Úextract_rangeÚisinrQ   rW   c              3  ó0   "  € T F  q\         J x € K  	  R # 5ir™   r   )Ú.0Úvs   & rM   Ú	<genexpr>Úisin.<locals>.<genexpr>9  s   é € Ð,¡V œ•G£Vùs   ‚Fc                óœ   € \         P                  ! \         P                  ! W4      P                  4       \         P                  ! V 4      4      # r™   )r\   Ú
logical_orr»   r§   Úisnan)Úcr¾   s   &&rM   ÚfÚisin.<locals>.f?  s,   € Ü—}’}¤R§W¢W¨Q£]×%8Ñ%8Ó%:¼B¿HºHÀQ»KÓHÐHrO   c                óJ   € \         P                  ! W4      P                  4       # r™   )r\   r»   r§   )ÚaÚbs   &&rM   Ú<lambda>Úisin.<locals>.<lambda>C  s   € œRŸWšW Q›]×0Ñ0Ô2rO   rT   )&r%   rz   r{   r|   r[   r0   r3   r/   r\   rb   r   r�   r¥   rX   Úkindr'   r   r   r1   r8   r:   r»   r(   Úpd_arrayr&   ÚzerosÚshaper±   rd   rf   r,   r]   Ú_MINIMUM_COMP_ARR_LENÚanyr5   r   ÚhtableÚismember)rµ   rH   Úorig_valuesÚcomps_arrayrÅ   Úcommons   &&    rM   r»   r»   í  s·  € ô ˜×ÒÜð(Ü(,¨U«×(<Ñ(<Ð'=¸Qð@ó
ð 	
ô ˜×ÒÜð(Ü(,¨V«×(=Ñ(=Ð'>¸aðAó
ð 	
ô
 �fœx¬Ô4EÄrÇzÁzÐR×SÒSÜ˜6“lˆÜ" ;¸.ÔIˆô �‹K˜!ŒOØ—‘×!Ñ! WÔ,Ü+¨E×2Ò2Ü" 6×1Ò1ô =¸[ÓIˆFøä	�FœM×	*Ò	*ä—’˜&Ó!‰ä˜v°TÈÔNˆä# E°VÔ<€KÜ ¸4Ô@€KÜ�k¤2§:¡:×.Ò.à×Ñ Ó'Ð'ä	˜[×.Ñ.×	/Ò	/ä˜Ó$×)Ñ)¨&Ó1Ð1Ü	˜VŸ\™\×	*Ò	*´?À;×CTÑCT×3UÒ3Uä�xŠx˜×)Ñ)´Ô6Ð6ä	˜VŸ\™\×	*Ò	*Ü�K§¡¬vÓ!6Ó7Ð7ä	�F—L‘L¤.×	1Ò	1Ü”B—J’J˜{Ó+¬R¯ZªZ¸Ó-?Ó@Ð@ô 	ˆKÓÔ0Ô0Ü�‹K˜2ÔØ×Ñ¤Ô'ß“Ñ,¡VÓ,——’Ñ,¡VÓ,×,Ò,ô �‹<×Ñ×ÒóIñ 3‰Aô % V§\¡\°;×3DÑ3DÓEˆØ—‘˜v¨E�Ó2ˆØ!×(Ñ(¨°eÐ(Ó<ˆÜ�O‰Oˆáˆ[Ó!Ð!rO   c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )rG   rH   rJ   Úuse_na_sentinelr±   Ú	size_hintú
int | NoneÚna_valuerf   r¬   r­   rI   z'tuple[npt.NDArray[np.intp], np.ndarray]rK   )rL   s   "rM   rN   rN   N  sD   € ÷ ;ñ ;Øð;àð;ð ð;ð ð	;ð
 'ð;ð -ñ;rO   c                ó  € T pV P                   P                  R9   d   \        p\        V 4      w  r`T! T;'       g    \	        V 4      4      pVP                  V RVVVR7      w  r‰\        W…P                   V4      p\        V	4      p	W˜3# )aÄ  
Factorize a numpy array to codes and uniques.

This doesn't do any coercion of types or unboxing before factorization.

Parameters
----------
values : ndarray
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.
size_hint : int, optional
    Passed through to the hashtable's 'get_labels' method
na_value : object, optional
    A value in `values` to consider missing. Note: only use this
    parameter when you know that you don't have any values pandas would
    consider missing in the array (NaN for float data, iNaT for
    datetimes, etc.).
mask : ndarray[bool], optional
    If not None, the mask is used as indicator for missing values
    (True = missing, False = valid) instead of `na_value` or
    condition "val != val".

Returns
-------
codes : ndarray[np.intp]
uniques : ndarray
ÚmM)Úna_sentinelrÛ   r¬   Ú	ignore_naéÿÿÿÿ)rX   rÌ   r
   r’   r¥   Ú	factorizern   r   )
rH   rØ   rÙ   rÛ   r¬   ri   Ú
hash_klassr²   r³   ra   s
   &&&&&     rM   Úfactorize_arrayrã   N  sŽ   € ðH €HØ‡|�|×Ñ˜DÔ ô
 ˆä,¨VÓ4Ñ€Já�y×/Ð/¤C¨£KÓ0€EØ—_‘_ØØØØØ!ð %ó �N€Gô   ¯©¸ÓB€Gä Ó&€EØˆ>ÐrO   c               ó(   € V ^8„  d   QhRRRRRRRR/# )rG   Úsortr±   rØ   rÙ   rÚ   rI   z%tuple[np.ndarray, np.ndarray | Index]rK   )rL   s   "rM   rN   rN   �  s8   € ÷ yñ yà
ðyð ðyð ð	yð
 +ñyrO   c                ó  € \        V \        \        34      '       d   V P                  WR7      # \	        V RR7      p T p\        V \
        \        34      '       d&   V P                  e   V P                  VR7      w  rVWV3# \        V \        P                  4      '       g   V P                  VR7      w  rVM’\        P                  ! V 4      p V'       ge   V P                  \        8X  dP   \        V 4      pVP                  4       '       d/   \        V P                  RR7      p\        P                   ! WxV 4      p \#        V VVR7      w  rVV'       d#   \%        V4      ^ 8”  d   \'        VVVR	RR
7      w  re\)        WdP                  V4      pWV3# )a¥  
Encode the object as an enumerated type or categorical variable.

This method is useful for obtaining a numeric representation of an
array when all that matters is identifying distinct values. `factorize`
is available as both a top-level function :func:`pandas.factorize`,
and as a method :meth:`Series.factorize` and :meth:`Index.factorize`.

Parameters
----------
values : sequence
    A 1-D sequence. Sequences that aren't pandas objects are
    coerced to ndarrays before factorization.
sort : bool, default False
    Sort `uniques` and shuffle `codes` to maintain the
    relationship.
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.
size_hint : int, optional
    Hint to the hashtable sizer.

Returns
-------
codes : ndarray
    An integer ndarray that's an indexer into `uniques`.
    ``uniques.take(codes)`` will have the same values as `values`.
uniques : ndarray, Index, or Categorical
    The unique valid values. When `values` is Categorical, `uniques`
    is a Categorical. When `values` is some other pandas object, an
    `Index` is returned. Otherwise, a 1-D ndarray is returned.

    .. note::

       Even if there's a missing value in `values`, `uniques` will
       *not* contain an entry for it.

See Also
--------
cut : Discretize continuous-valued array.
unique : Find the unique value in an array.

Notes
-----
Reference :ref:`the user guide <reshaping.factorize>` for more examples.

Examples
--------
These examples all show factorize as a top-level method like
``pd.factorize(values)``. The results are identical for methods like
:meth:`Series.factorize`.

>>> codes, uniques = pd.factorize(np.array(["b", "b", "a", "c", "b"], dtype="O"))
>>> codes
array([0, 0, 1, 2, 0])
>>> uniques
array(['b', 'a', 'c'], dtype=object)

With ``sort=True``, the `uniques` will be sorted, and `codes` will be
shuffled so that the relationship is the maintained.

>>> codes, uniques = pd.factorize(
...     np.array(["b", "b", "a", "c", "b"], dtype="O"), sort=True
... )
>>> codes
array([1, 1, 0, 2, 1])
>>> uniques
array(['a', 'b', 'c'], dtype=object)

When ``use_na_sentinel=True`` (the default), missing values are indicated in
the `codes` with the sentinel value ``-1`` and missing values are not
included in `uniques`.

>>> codes, uniques = pd.factorize(np.array(["b", None, "a", "c", "b"], dtype="O"))
>>> codes
array([ 0, -1,  1,  2,  0])
>>> uniques
array(['b', 'a', 'c'], dtype=object)

Thus far, we've only factorized lists (which are internally coerced to
NumPy arrays). When factorizing pandas objects, the type of `uniques`
will differ. For Categoricals, a `Categorical` is returned.

>>> cat = pd.Categorical(["a", "a", "c"], categories=["a", "b", "c"])
>>> codes, uniques = pd.factorize(cat)
>>> codes
array([0, 0, 1])
>>> uniques
['a', 'c']
Categories (3, str): ['a', 'b', 'c']

Notice that ``'b'`` is in ``uniques.categories``, despite not being
present in ``cat.values``.

For all other pandas objects, an Index of the appropriate type is
returned.

>>> cat = pd.Series(["a", "a", "c"])
>>> codes, uniques = pd.factorize(cat)
>>> codes
array([0, 0, 1])
>>> uniques
Index(['a', 'c'], dtype='str')

If NaN is in the values, and we want to include NaN in the uniques of the
values, it can be achieved by setting ``use_na_sentinel=False``.

>>> values = np.array([1, 2, 1, np.nan])
>>> codes, uniques = pd.factorize(values)  # default: use_na_sentinel=True
>>> codes
array([ 0,  1,  0, -1])
>>> uniques
array([1., 2.])

>>> codes, uniques = pd.factorize(values, use_na_sentinel=False)
>>> codes
array([0, 1, 0, 2])
>>> uniques
array([ 1.,  2., nan])
)rå   rØ   rá   r¯   )rå   )rØ   F)Úcompat)rØ   rÙ   T)rØ   Úassume_uniqueÚverify)r[   r0   r3   rá   r�   r.   r4   Úfreqr\   rb   r]   rX   rf   r5   rÑ   r6   Úwhererã   r¥   Ú	safe_sortrn   )	rH   rå   rØ   rÙ   ri   ra   r³   Ú	null_maskrÛ   s	   &&&&     rM   rá   rá   Œ  sQ  € ôP �&œ8¤YÐ/×0Ò0Ø×Ñ TÐÓKÐKä˜v°Ô=€FØ€Hô 	�6Ô,Ô.?Ð@×AÒAØ�K‰KÒ#ð  ×)Ñ)¨tÐ)Ó4‰ˆØˆ~Ðä˜¤§
¡
×+Ò+à×)Ñ)¸/Ð)ÓJ‰ˆˆwô —’˜FÓ#ˆç 6§<¡<´6Ô#9ô
 ˜V›ˆIØ�}‰}�ŠÜ-¨f¯l©lÀ5ÔI�äŸš )°vÓ>�ä(ØØ+Øô
‰ˆ÷ ”�G“˜qÔ Ü"ØØØ+ØØô
‰ˆô   ¯©¸ÓB€Gàˆ>ÐrO   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )rG   rå   r±   Ú	ascendingÚ	normalizeÚdropnarI   rA   rK   )rL   s   "rM   rN   rN   I  sC   € ÷ [ñ [à
ð[ð ð[ð ð	[ð ð[ð ñ[rO   c                ó  € ^ RI HpHpHpHp	 \        V RR4      p
V'       d   RMRpVeâ   ^ RIHp \        W4      '       d   V P                  p  V! WRR7      pTP                  TR
7      pY¿n        YÿP                  P                  4       ,          pTP                  P                  R4      Tn        TP!                  4       pT'       d7   TP                  ^ 8H  P#                  4       '       d   TP$                  R,          p\'        T4      pEM”Rp\)        V 4      '       d=   V! V RR7      P                  P                  VR
7      pW¿n        W¯P                  n        EME\        V \*        4      '       dc   \-        \/        V P0                  4      4      pV! WR7      P3                  VVR7      P5                  4       pV P6                  VP                  n        MÍ\9        V RR7      p \;        W4      w  pppVP<                  \>        P@                  8X  d    VP                  \>        PB                  4      pV! VVP<                  V
RR7      pV'       gJ   \        WV	34      '       d7   VPE                  V 4      '       d    V PF                  e   V PF                  Vn$        V! VVVRR7      pV'       d   VPK                  VRR7      pV'       d&   Ve   VV,          pV# WÿPM                  4       ,          pV#   \         d   p\        R	4      ThRp?ii ; i)é    )ÚDatetimeIndexr@   rA   ÚTimedeltaIndexr•   NÚ
proportionÚcount)ÚcutT)Úinclude_lowestz+bins argument only works with numeric data.©rñ   Úinterval:ró   ró   NFrT   )Úindexr•   )Úlevelrñ   Úvalue_countsr¯   )rX   r•   rU   )rü   r•   rU   Ústable)rï   rÌ   )'rž   rô   r@   rA   rõ   ÚgetattrÚpandas.core.reshape.tilerø   r[   Ú_valuesrz   rþ   r•   rü   Únotnard   Ú
sort_indexÚallÚilocr¥   r    r1   r   ÚrangeÚnlevelsÚgroupbyÚsizeÚnamesr�   Úvalue_counts_arraylikerX   r\   Úfloat16r…   ÚequalsÚinferred_freqrê   Úsort_valuesr¨   )rH   rå   rï   rð   Úbinsrñ   rô   r@   rA   rõ   Ú
index_namer•   rø   ÚiiÚerrr©   Únormalize_denominatorÚlevelsÚkeysÚcountsÚ_Úidxs   &&&&&&                rM   Úvalue_counts_internalr  I  s�  € ÷ó ô ˜ ¨Ó.€Jß$‰<¨'€DàÒÝ0ä�f×%Ò%Ø—^‘^ˆFð	TÙ�V°$Ô7ˆBð
 —‘¨�Ó/ˆØŒØŸ™×*Ñ*Ó,Õ-ˆØ—|‘|×*Ñ*¨:Ó6ˆŒØ×"Ñ"Ó$ˆ÷ �v—~‘~¨Ñ*×/Ñ/×1Ò1Ø—[‘[ Õ%ˆFô !$ B£Òð !%ÐÜ# F×+Ò+á˜F¨Ô/×7Ñ7×DÑDÈFÐDÓSˆFØŒKØ *�L‰LÖä˜¤×.Ò.äœ% §¡Ó/Ó0ˆFá˜VÔ/ß‘˜v¨f�Ó5ß‘“ð ð
 "(§¡ˆF�L‰LÕô ' v¸ÔHˆFÜ4°VÓD‰OˆD�&˜!Ø�z‰zœRŸZ™ZÔ'Ø—{‘{¤2§:¡:Ó.�ñ ˜ D§J¡J°ZÀeÔLˆC÷ Ü˜v°~Ð'F×GÒGØ—J‘J˜v×&Ò&Ø×(Ñ(Ò4ð "×/Ñ/�”á˜F¨#°D¸uÔEˆFçØ×#Ñ#¨i¸hÐ#ÓGˆçØ Ò,ØÐ3Õ3ˆFð €Mð Ÿj™j›lÕ*ˆFà€MøôC ô 	TÜÐIÓJÐPSÐSûð	Tús   Á
K) Ë)LË4L Ì Lc               ó(   € V ^8„  d   QhRRRRRRRR/# )	rG   rH   rJ   rñ   r±   r¬   r­   rI   z,tuple[ArrayLike, npt.NDArray[np.int64], int]rK   )rL   s   "rM   rN   rN   ¨  s,   € ÷ (ñ (Øð(Ø $ð(Ø,Hð(à1ñ(rO   c                óü   € T p\        V 4      p \        P                  ! WVR7      w  rEp\        VP                  4      '       d!   V'       d   V\
        8g  pWB,          WR,          rT\        WCP                  V4      pWuV3# )z«
Parameters
----------
values : np.ndarray
dropna : bool
mask : np.ndarray[bool] or None, default None

Returns
-------
uniques : np.ndarray
counts : np.ndarray[np.int64]
r°   )r_   rÒ   Úvalue_countr(   rX   r
   rn   )rH   rñ   r¬   ri   r  r  Ú
na_counterÚres_keyss   &&&     rM   r  r  ¨  sm   € ð €HÜ˜&Ó!€Fä%×1Ò1°&ÀtÔLÑ€D�*ä˜8Ÿ>™>×*Ò*÷ Øœ4‘<ˆDØ�: v¥|�&ä  §~¡~°xÓ@€HØ˜ZÐ'Ð'rO   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	rG   rH   r   ÚkeepzLiteral['first', 'last', False]r¬   r­   rI   r¶   rK   )rL   s   "rM   rN   rN   Ç  s0   € ÷ ;ñ ;Øð;à
)ð;ð 'ð;ð ñ	;rO   c                óH   € \        V 4      p \        P                  ! WVR7      # )a4  
Return boolean ndarray denoting duplicate values.

Parameters
----------
values : np.ndarray or ExtensionArray
    Array over which to check for duplicate values.
keep : {'first', 'last', False}, default 'first'
    - ``first`` : Mark duplicates as ``True`` except for the first
      occurrence.
    - ``last`` : Mark duplicates as ``True`` except for the last
      occurrence.
    - False : Mark all duplicates as ``True``.
mask : ndarray[bool], optional
    array indicating which elements to exclude from checking

Returns
-------
duplicated : ndarray[bool]
)r"  r¬   )r_   rÒ   Ú
duplicated)rH   r"  r¬   s   &&&rM   r$  r$  Ç  s!   € ô2 ˜&Ó!€FÜ×Ò˜V°TÔ:Ð:rO   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	rG   rH   r   rñ   r±   r¬   r­   rI   z9tuple[np.ndarray, npt.NDArray[np.bool_]] | ExtensionArrayrK   )rL   s   "rM   rN   rN   ä  s,   € ÷ +ñ +Øð+Ø#ð+Ø2Nð+à>ñ+rO   c                ó"  € \        V RR7      p T p\        V P                  4      '       d*   \        V 4      p \	        RV 4      p V P                  VR7      # \        V 4      p \        P                  ! WVR7      w  rEVf2   \        P                  ! VP                  \        P                  R7      pMWE3#  \        V4      p\%        WCP                  V4      pWu3#   \         d.   p\        P                   ! RT 2\#        4       R	7        Rp?LLRp?ii ; i)
a  
Returns the mode(s) of an array.

Parameters
----------
values : array-like
    Array over which to check for duplicate values.
dropna : bool, default True
    Don't consider counts of NaN/NaT.

Returns
-------
Union[Tuple[np.ndarray, npt.NDArray[np.bool_]], ExtensionArray]
Úmoder¯   rC   rú   )rñ   r¬   NrW   zUnable to sort modes: )Ú
stacklevel)r�   r(   rX   r9   r   Ú_moder_   rÒ   r'  r\   rÎ   rÏ   Úbool_rì   rz   ÚwarningsÚwarnr   rn   )rH   rñ   r¬   ri   ÚnpresultÚres_maskr  r©   s   &&&     rM   r'  r'  ä  sí   € ô" ˜v°Ô8€FØ€Hä˜6Ÿ<™<×(Ò(ä/°Ó7ˆÜÐ&¨Ó/ˆØ�|‰| 6ˆ|Ó*Ð*ä˜&Ó!€FäŸš VÀÔFÑ€HØÒÜ—8’8˜HŸN™N´"·(±(Ô;‰àÐ!Ð!ð
Ü˜XÓ&ˆô ˜x¯©¸ÓB€FØÐÐøô ô 
Ü�ŠØ$ S EÐ*Ü'Ó)÷	
ò 	
ûð
ús   Â2C ÃDÃ!#D	Ä	Dc               ó8   € V ^8„  d   QhRRRRRRRRRR	R
R	RRRR/# )rG   rH   r   Úaxisr   Úmethodrq   Ú	na_optionrï   r±   Úpctr¬   r­   rI   znpt.NDArray[np.float64]rK   )rL   s   "rM   rN   rN     sX   € ÷ =ñ =Øð=à
ð=ð ð=ð ð	=ð
 ð=ð 
ð=ð 'ð=ð ñ=rO   c           
     ó$  € \        V P                  4      p\        V 4      p V P                  ^8X  d    \        P
                  ! V VVVVVVR7      pV# V P                  ^8X  d&   Ve   Q h\        P                  ! V VVVVVVR7      pV# \        R4      h)a  
Rank the values along a given axis.

Parameters
----------
values : np.ndarray or ExtensionArray
    Array whose values will be ranked. The number of dimensions in this
    array must not exceed 2.
axis : int, default 0
    Axis over which to perform rankings.
method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
    The method by which tiebreaks are broken during the ranking.
na_option : {'keep', 'top'}, default 'keep'
    The method by which NaNs are placed in the ranking.
    - ``keep``: rank each NaN value with a NaN ranking
    - ``top``: replace each NaN with either +/- inf so that they
               there are ranked at the top
ascending : bool, default True
    Whether or not the elements should be ranked in ascending order.
pct : bool, default False
    Whether or not to the display the returned rankings in integer form
    (e.g. 1, 2, 3) or in percentile form (e.g. 0.333..., 0.666..., 1).
mask : bool ndarray, optional
    Boolean array indicating which elements to exclude from ranking.
)Úis_datetimelikeÚties_methodrï   r2  r3  r¬   )r0  r5  r6  rï   r2  r3  z&Array with ndim > 2 are not supported.)r(   rX   r_   Úndimr   Úrank_1dÚrank_2drz   )	rH   r0  r1  r2  rï   r3  r¬   r5  Úrankss	   &&&&&&&  rM   Úrankr;    s£   € ôD *¨&¯,©,Ó7€OÜ˜&Ó!€Fà‡{�{�aÔÜ—’ØØ+ØØØØØô
ˆð. €Lð 
�‰˜Ô	ØŠ|Ðˆ|Ü—’ØØØ+ØØØØô
ˆð €Lô Ð@ÓAÐArO   zpandas.api.extensionsc               ó$   € V ^8„  d   QhRRRRRR/# )rG   Úindicesr   r0  r   Ú
allow_fillr±   rK   )rL   s   "rM   rN   rN   X  s-   € ÷ mñ màðmð ðmð ñ	mrO   c                óZ  € \        V \        P                  \        \        \
        \        34      '       g#   \        R\        V 4      P                   R24      h\        V4      pV'       d/   \        WP                  V,          4       \        V VVRVR7      pV# V P                  WR7      pV# )aÇ  
Take elements from an array.

Parameters
----------
arr : numpy.ndarray, ExtensionArray, Index, or Series
    Input array.
indices : sequence of int or one-dimensional np.ndarray of int
    Indices to be taken.
axis : int, default 0
    The axis over which to select values.
allow_fill : bool, default False
    How to handle negative values in `indices`.

    * False: negative values in `indices` indicate positional indices
      from the right (the default). This is similar to :func:`numpy.take`.

    * True: negative values in `indices` indicate
      missing values. These values are set to `fill_value`. Any other
      negative values raise a ``ValueError``.

fill_value : any, optional
    Fill value to use for NA-indices when `allow_fill` is True.
    This may be ``None``, in which case the default NA value for
    the type (``self.dtype.na_value``) is used.

    For multi-dimensional `arr`, each *element* is filled with
    `fill_value`.

Returns
-------
ndarray or ExtensionArray
    Same type as the input.

Raises
------
IndexError
    When `indices` is out of bounds for the array.
ValueError
    When the indexer contains negative values other than ``-1``
    and `allow_fill` is True.

Notes
-----
When `allow_fill` is False, `indices` may be whatever dimensionality
is accepted by NumPy for `arr`.

When `allow_fill` is True, `indices` should be 1-D.

See Also
--------
numpy.take : Take elements from an array along an axis.

Examples
--------
>>> import pandas as pd

With the default ``allow_fill=False``, negative numbers indicate
positional indices from the right.

>>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1])
array([10, 10, 30])

Setting ``allow_fill=True`` will place `fill_value` in those positions.

>>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True)
array([10., 10., nan])

>>> pd.api.extensions.take(
...     np.array([10, 20, 30]), [0, 0, -1], allow_fill=True, fill_value=-10
... )
array([ 10,  10, -10])
zkpd.api.extensions.take requires a numpy.ndarray, ExtensionArray, Index, Series, or NumpyExtensionArray got rt   T)r0  r>  Ú
fill_value)r0  )r[   r\   rb   r/   r0   r3   r2   rz   r{   r|   r   r;   rÏ   r7   Útake)Úarrr=  r0  r>  r@  r©   s   &&&&& rM   rA  rA  W  s­   € ôb ØÜ	�‰Ô&¬´)Ô=SÐT÷ò ô
 ð9Ü9=¸c»×9KÑ9KÐ8LÈAðOó
ð 	
ô
 " 'Ó*€Gçä˜§)¡)¨D¥/Ô2ô ØØØØØ!ô
ˆð €Mð —‘˜'�Ó-ˆØ€MrO   c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )rG   rB  r   Úvaluez$NumpyValueArrayLike | ExtensionArrayÚsidezLiteral['left', 'right']ÚsorterzNumpySorter | NonerI   znpt.NDArray[np.intp] | np.intprK   )rL   s   "rM   rN   rN   Í  sA   € ÷ Q=ñ Q=Ø	ðQ=à/ðQ=ð #ðQ=ð ð	Q=ð
 $ñQ=rO   c                ó@  € Ve   \        V4      p\        V \        P                  4      '       EdR   V P                  P
                  R9   Ed6   \        V4      '       g   \        V4      '       Ed   \        P                  ! V P                  P                  4      p\        V4      '       d   \        P                  ! V.4      M\        P                  ! V4      pWTP                  8¬  P                  4       '       d0   WTP                  8*  P                  4       '       d   V P                  pMVP                  p\        V4      '       d!   \        \        VP                  V4      4      pM'\!        \        \"        V4      VR7      pM\%        V 4      p V P'                  WVR7      # )ao  
Find indices where elements should be inserted to maintain order.

Find the indices into a sorted array `arr` (a) such that, if the
corresponding elements in `value` were inserted before the indices,
the order of `arr` would be preserved.

Assuming that `arr` is sorted:

======  ================================
`side`  returned index `i` satisfies
======  ================================
left    ``arr[i-1] < value <= self[i]``
right   ``arr[i-1] <= value < self[i]``
======  ================================

Parameters
----------
arr: np.ndarray, ExtensionArray, Series
    Input array. If `sorter` is None, then it must be sorted in
    ascending order, otherwise `sorter` must be an array of indices
    that sort it.
value : array-like or scalar
    Values to insert into `arr`.
side : {'left', 'right'}, optional
    If 'left', the index of the first suitable location found is given.
    If 'right', return the last such index.  If there is no suitable
    index, return either 0 or N (where N is the length of `self`).
sorter : 1-D array-like, optional
    Optional array of integer indices that sort array a into ascending
    order. They are typically the result of argsort.

Returns
-------
array of ints or int
    If value is array-like, array of insertion points.
    If value is scalar, a single integer.

See Also
--------
numpy.searchsorted : Similar method from NumPy.
ÚiurW   )rE  rF  )r   r[   r\   rb   rX   rÌ   r#   r$   Úiinfor{   r8   Úminr  Úmaxr   r¢   rÍ   r   r9   Úsearchsorted)rB  rD  rE  rF  rI  Ú	value_arrrX   s   &&&&   rM   rL  rL  Í  s   € ð` ÒÜ$ VÓ,ˆô 	�3œŸ
™
×#Ó#Ø�I‰I�N‰N˜dÕ"Ü˜×ÒÔ"2°5×"9Ó"9ô —’˜Ÿ™Ÿ™Ó(ˆÜ)3°E×):Ò):”B—H’H˜e˜WÔ%ÄÇÂÈÃˆ	ØŸ™Ñ"×'Ñ'×)Ò)¨y¿I¹IÑ/E×.JÑ.J×.LÒ.Lð —I‘I‰Eà—O‘OˆEä�e×Òäœ˜eŸj™j¨Ó/Ó0‰EäœT¤)¨UÓ3¸5ÔA‰Eô -¨SÓ1ˆð ×Ñ˜E°VÐÓ<Ð<rO   c               ó    € V ^8„  d   QhRRRR/# )rG   Únz&int | float | np.integer | np.floatingr0  r   rK   )rL   s   "rM   rN   rN   (  s   € ÷ lñ lÐ7ð l¸wñ lrO   c                óœ  € \         P                  ! V4      '       g>   \        V4      '       d   VP                  4       '       g   \        R4      h\	        V4      p\
        P                  pV P                  p\        V4      pV'       d   \        P                  pM\        P                  p\        V\        4      '       d   V P                  4       p V P                  p\        V \
        P                  4      '       g„   \!        V RVP"                   R24      '       dC   V^ 8w  d%   \        R\%        V 4      P"                   RV 24      hV! W P'                  V4      4      # \)        \%        V 4      P"                   R24      hRpV P                  P*                  R9   d+   \
        P,                  pV P/                  R4      p \0        pR	pMfV'       d   \
        P2                  pMMVP*                  R
9   d=   V P                  P4                  R9   d   \
        P6                  pM\
        P8                  pV P:                  pV^8X  d   V P=                  R^4      p \
        P                  ! V4      p\
        P>                  ! V P@                  VR7      p	\C        R4      .^,          p
V^ 8¼  d   \C        RV4      M\C        VR4      W¢&   W9\E        V
4      &   V P                  P4                  \F        9   d$   \H        PJ                  ! W	\	        V4      W'R7       M—\C        R4      .^,          pV^ 8¼  d   \C        VR4      M\C        RV4      W²&   \E        V4      p\C        R4      .^,          pV^ 8”  d   \C        RV) 4      M\C        V) R4      WÒ&   \E        V4      pV! W,          W,          4      Wœ&   V'       d   V	P/                  R4      p	V^8X  d
   V	R,          p	V	# )a  
difference of n between self,
analogous to s-s.shift(n)

Parameters
----------
arr : ndarray or ExtensionArray
n : int
    number of periods
axis : {0, 1}
    axis to shift on
stacklevel : int, default 3
    The stacklevel for the lost dtype warning.

Returns
-------
shifted
zperiods must be an integerÚ__zcannot diff z	 on axis=zK has no 'diff' method. Convert to a suitable dtype prior to calling 'diff'.FrÝ   rV   TrH  rW   N)Údatetimelikeztimedelta64[ns])rŒ   r‹   rà   ):NNNró   )&r   r#   r!   Ú
ValueErrorr¢   r\   ÚnanrX   r   ÚoperatorÚxorÚsubr[   r-   Úto_numpyrb   Úhasattrr|   r{   Úshiftrz   rÌ   r‰   rc   r
   Úobject_r•   r…   r„   r7  ÚreshapeÚemptyrÏ   Úslicer~   Ú_diff_specialr   Údiff_2d)rB  rO  r0  ÚnarX   Úis_boolÚopÚis_timedeltaÚ	orig_ndimÚout_arrÚ
na_indexerÚ_res_indexerÚres_indexerÚ_lag_indexerÚlag_indexers   &&&            rM   Údiffrl  (  sâ  € ô, �>Š>˜!×ÒÜ˜—’ §¡§¢ÜÐ9Ó:Ð:Ü�‹FˆÜ	�‰€BØ�I‰I€Eä˜EÓ"€GßÜ�\‰\‰ä�\‰\ˆä�%œ×&Ò&à�l‰l‹nˆØ—	‘	ˆä�cœ2Ÿ:™:×&Ò&ä�3˜"˜RŸ[™[˜M¨Ð,×-Ò-Ø�qŒyÜ  <´°S³	×0BÑ0BÐ/CÀ9ÈTÈFÐ!SÓTÐTÙ�cŸ9™9 Q›<Ó(Ð(äÜ˜“9×%Ñ%Ð&ð 'Gð Góð ð
 €LØ
‡y�y‡~�~˜ÔÜ—‘ˆØ�h‰h�t‹nˆÜˆØ‰ç	ä—
‘
‰à	�‰�tÔ	ð
 �9‰9�>‰>Ð.Ô.Ü—J‘J‰Eä—J‘JˆEà—‘€IØ�A„~à�k‰k˜"˜aÓ ˆô �HŠH�U‹O€EÜ�hŠh�s—y‘y¨Ô.€Gä˜“+� Õ"€JØ)*¨a¬”u˜T 1”~´U¸1¸d³^€JÑØ!#ŒE�*ÓÑà
‡y�y‡~�~œÔ&ô 	�Š�c¤C¨£F¨DÖLô ˜d›�} qÕ(ˆØ/0°A¬vœU 1 dœ^¼5ÀÀq»>ˆÑÜ˜LÓ)ˆä˜d›�} qÕ(ˆØ01°A´œU 4¨!¨œ_¼5À!ÀÀT»?ˆÑÜ˜LÓ)ˆá! #Õ"2°CÕ4DÓEˆÑçØ—,‘,Ð0Ó1ˆà�A„~Ø˜$•-ˆØ€NrO   c               ó0   € V ^8„  d   QhRRRRRRRRRRR	R
/# )rG   rH   zIndex | ArrayLikera   znpt.NDArray[np.intp] | NonerØ   r±   rè   ré   rI   z.AnyArrayLike | tuple[AnyArrayLike, np.ndarray]rK   )rL   s   "rM   rN   rN   ž  sL   € ÷ w3ñ w3Øðw3à&ðw3ð ðw3ð ð	w3ð
 ðw3ð 4ñw3rO   c                ó2  € \        V \        P                  \        \        34      '       g   \        R4      hRp\        V P                  \        4      '       g*   \        P                  ! V RR7      R8X  d   \        V 4      pM" V P                  4       pV P                  V4      pVf   V# \%        V4      '       g   \        R4      h\'        \        P(                  ! V4      4      pV'       g.   \+        \-        V 4      4      \+        V 4      8X  g   \/        R4      hVfJ   \1        V 4      w  rpV! \+        V 4      4      pVP3                  V 4       \'        VP5                  V4      4      pV'       dM   VP                  4       p	V'       d'   V\+        V 4      ) 8  V\+        V 4      8¬  ,          p
RW&   \7        W‘RR7      pMg\        P8                  ! \+        V4      \:        R	7      pVP=                  V\        P>                  ! \+        V4      4      4       VP                  VR
R7      pV\'        V4      3#   \
        \        P                  3 dM    T P                  '       d,   \        T ^ ,          \         4      '       d   \#        T 4      p ELã\        T 4      p ELñi ; i)a‹  
Sort ``values`` and reorder corresponding ``codes``.

``values`` should be unique if ``codes`` is not None.
Safe for use with mixed types (int, str), orders ints before strs.

Parameters
----------
values : list-like
    Sequence; must be unique if ``codes`` is not None.
codes : np.ndarray[intp] or None, default None
    Indices to ``values``. All out of bound indices are treated as
    "not found" and will be masked with ``-1``.
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.
assume_unique : bool, default False
    When True, ``values`` are assumed to be unique, which can speed up
    the calculation. Ignored when ``codes`` is None.
verify : bool, default True
    Check if codes are out of bound for the values and put out of bound
    codes equal to ``-1``. If ``verify=False``, it is assumed there
    are no out of bound codes. Ignored when ``codes`` is None.

Returns
-------
ordered : AnyArrayLike
    Sorted ``values``
new_codes : ndarray
    Reordered ``codes``; returned when ``codes`` is not None.

Raises
------
TypeError
    * If ``values`` is not list-like or if ``codes`` is neither None
    nor list-like
    * If ``values`` cannot be sorted
ValueError
    * If ``codes`` is not None and ``values`` contain duplicates.
zbOnly np.ndarray, ExtensionArray, and Index objects are allowed to be passed to safe_sort as valuesNFru   ry   zMOnly list-like objects or None are allowed to be passed to safe_sort as codesz,values should be unique if codes is not None©r@  rW   Úwrap)r'  rà   ) r[   r\   rb   r/   r0   rz   rX   r,   r   r}   Ú_sort_mixedÚargsortrA  ÚdecimalÚInvalidOperationr
  r~   Ú_sort_tuplesr%   r   r]   r¥   r›   rS  r’   Úmap_locationsÚlookupr7   r]  r¢   ÚputÚarange)rH   ra   rØ   rè   ré   rF  Úorderedrâ   ÚtÚorder2r¬   Ú	new_codesÚreverse_indexers   &&&&&        rM   rì   rì   ž  s  € ô` �fœrŸz™zÔ+<¼hÐG×HÒHÜð/ó
ð 	
ð
 €Fô �v—|‘|¤^×4Ò4Ü�OŠO˜F¨5Ô1°_ÔDä˜fÓ%‰ð	.Ø—^‘^Ó%ˆFØ—k‘k &Ó)ˆGð ‚}Øˆä˜×ÒÜð.ó
ð 	
ô  ¤§
¢
¨5Ó 1Ó2€Eç¤¤V¨F£^Ó!4¼¸F»Ô!CÜÐGÓHÐHà‚~ô
 1°Ó8Ñˆ
Ù”s˜6“{Ó#ˆØ	�‰˜Ôô % Q§X¡X¨gÓ%6Ó7ˆçà—‘Ó!ˆßØœS ›[˜LÑ(¨U´c¸&³kÑ-AÕBˆDØˆE‰KÜ˜F°bÔ9‰	äŸ(š(¤3 v£;´cÔ:ˆØ×Ñ˜F¤B§I¢I¬c°&«kÓ$:Ô;ð $×(Ñ(¨°VÐ(Ó<ˆ	àÔ'¨	Ó2Ð2Ð2øôk œ7×3Ñ3Ð4ô 
	.ð �{�{ˆ{œz¨&°­)´U×;Ò;ô ' vÓ.“ä% fÓ-“ð
	.ús   Â!H/ È/,JÉ(JÊJÊJc               ó   € V ^8„  d   QhRR/# )rG   rI   r   rK   )rL   s   "rM   rN   rN     s   € ÷ ñ ˜<ñ rO   c           	     ó’  € \         P                  ! V  Uu. uF  p\        V\        4      NK  	  up\        R7      p\         P                  ! V  Uu. uF  p\        V4      NK  	  up\        R7      pV( V( ,          p\         P                  ! W,          4      p\         P                  ! W,          4      pVP                  4       ^ ,          P                  V4      pVP                  4       ^ ,          P                  V4      pVP                  4       ^ ,          p	\         P                  ! W‡V	.4      p
V P                  V
4      # u upi u upi )z3order ints before strings before nulls in 1d arraysrW   )
r\   r8   r[   rq   r±   r5   rr  ÚnonzerorA  Úconcatenate)rH   ÚxÚstr_posÚnull_posÚnum_posÚstr_argsortÚnum_argsortÚstr_locsÚnum_locsÚ	null_locsÚlocss   &          rM   rq  rq    sî   € ä�hŠh±FÓ;±F¨qœ
 1¤cÖ*±FÑ;Ä4ÔH€GÜ�xŠx©&Ó1©& Qœ˜až©&Ñ1¼Ô>€HØˆh˜(˜Õ"€GÜ—*’*˜V�_Ó-€KÜ—*’*˜V�_Ó-€Kà�‰Ó  Õ#×(Ñ(¨Ó5€HØ�‰Ó  Õ#×(Ñ(¨Ó5€HØ× Ñ Ó" 1Õ%€IÜ�>Š>˜8¨yÐ9Ó:€DØ�;‰;�tÓÐùò <ùÚ1s   •D?ÁEc               ó    € V ^8„  d   QhRRRR/# )rG   rH   rJ   rI   rK   )rL   s   "rM   rN   rN   '  s   € ÷ ñ ˜ð ¨
ñ rO   c                óT   € ^ RI Hp ^ RIHp V! V R4      w  r4V! VRR7      pW,          # )zð
Convert array of tuples (1d) to array of arrays (2d).
We need to keep the columns separately as they contain different types and
nans (can't use `np.sort` as it may fail when str and nan are mixed in a
column as types cannot be compared).
)Ú	to_arrays)Úlexsort_indexerNT)Úorders)Ú"pandas.core.internals.constructionr�  Úpandas.core.sortingr�  )rH   r�  r�  Úarraysr  Úindexers   &     rM   ru  ru  '  s,   € õ =Ý3á˜& $Ó'�I€FÙ˜f¨TÔ2€GØ�?ÐrO   c               ó$   € V ^8„  d   QhRRRRRR/# )rG   ÚlvalszArrayLike | IndexÚrvalsrI   rK   )rL   s   "rM   rN   rN   6  s$   € ÷ ,+ñ ,+Øð,+Ø%6ð,+àñ,+rO   c                ó²  € ^ RI Hp \        V RR7      p\        VRR7      pVP                  V^ R7      w  r4\        P
                  ! VP                  VP                  4      pV! WSP                  RRR7      p\        V \        4      '       d7   \        V\        4      '       d!   V P                  V4      P                  4       pMf\        V \        4      '       d   V P                  p \        V\        4      '       d   VP                  p\        W.4      p\        V4      p\        V4      pVP!                  V4      P                  p\        P"                  ! Wh4      # )a¹  
Extracts the union from lvals and rvals with respect to duplicates and nans in
both arrays.

Parameters
----------
lvals: np.ndarray or ExtensionArray
    left values which is ordered in front.
rvals: np.ndarray or ExtensionArray
    right values ordered after lvals.

Returns
-------
np.ndarray or ExtensionArray
    Containing the unsorted union of both arrays.

Notes
-----
Caller is responsible for ensuring lvals.dtype == rvals.dtype.
©rA   Frú   ro  r¢   )rü   rX   rU   )rž   rA   r  Úalignr\   ÚmaximumrH   rü   r[   r1   Úappendr›   r0   r  r)   r9   ÚreindexÚrepeat)	r—  r˜  rA   Úl_countÚr_countÚfinal_countÚunique_valsÚcombinedÚrepeatss	   &&       rM   Úunion_with_duplicatesr¦  6  s  € õ. ä# E°%Ô8€GÜ# E°%Ô8€GØ—}‘} W¸�}Ó;Ñ€GÜ—*’*˜WŸ^™^¨W¯^©^Ó<€KÙ˜¯M©MÀÈUÔS€KÜ�%œ×'Ò'¬J°u¼m×,LÒ,LØ—l‘l 5Ó)×0Ñ0Ó2‰ä�eœX×&Ò&Ø—M‘MˆEÜ�eœX×&Ò&Ø—M‘MˆEô ! % Ó0ˆÜ˜XÓ&ˆÜ4°[ÓAˆØ×!Ñ! +Ó.×5Ñ5€GÜ�9Š9�[Ó*Ð*rO   c               ó$   € V ^8„  d   QhRRRRRR/# )rG   rB  r   Ú	na_actionzLiteral['ignore'] | NonerI   z#np.ndarray | ExtensionArray | IndexrK   )rL   s   "rM   rN   rN   e  s2   € ÷ PTñ PTØ	ðPTð (ðPTð )ñ	PTrO   c                ó¼  a	€ ^ RI Hp VR9  d   RV R2p\        V4      h\        V4      '       d®   \	        V\
        4      '       d   \        VR4      '       d
   Vo	V	3R lpM|^ RI Hp \        V4      ^ 8X  d   V! V\        P                  R7      pMM\	        V\
        4      '       d0   V! VP                  4       V! VP                  4       R	R
7      R7      pMV! V4      p\	        V\        4      '       d[   VR8X  d!   WP                  P                  4       ,          pVP                  P!                  V 4      p\#        VP$                  V4      pV# \        V 4      '       g   V P'                  4       # V P)                  \*        R	R7      pVf   \,        P.                  ! W�4      # \,        P0                  ! W�\3        V4      P5                  \        P6                  4      R7      # )aå  
Map values using an input mapping or function.

Parameters
----------
mapper : function, dict, or Series
    Mapping correspondence.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NA values, without passing them to the
    mapping correspondence.

Returns
-------
Union[ndarray, Index, ExtensionArray]
    The output of the mapping function applied to the array.
    If the function returns a tuple with more than one element
    a MultiIndex will be returned.
)r@   Úignorez+na_action must either be 'ignore' or None, z was passedÚ__missing__c                ó¦   <€ S\        V \        4      '       d3   \        P                  ! V 4      '       d   \        P                  ,          # T ,          # r™   )r[   Úfloatr\   rÃ   rT  )rƒ  Údict_with_defaults   &€rM   rÊ   Úmap_array.<locals>.<lambda>Š  s2   ø€ Ð0Ü$ Q¬×.Ò.´2·8²8¸A·;²;”—‘ö ØDEö rO   rš  rW   F)Útupleize_cols)rü   rT   r°   )Nrª  )rž   r@   rS  r   r[   ÚdictrY  rA   r¥   r\   r„   rH   r  r3   rü   r  Úget_indexerr7   r  rU   rd   rf   r   Ú	map_inferÚmap_infer_maskr5   rc   rS   )
rB  Úmapperr¨  r@   ÚmsgrA   r•  Ú
new_valuesrH   r®  s
   &&&      @rM   Ú	map_arrayr¸  e  ss  ø€ õ. àÐ(Ô(Ø;¸I¸;ÀkÐRˆÜ˜‹oÐô
 �F×ÒÜ�fœd×#Ò#¬°¸×(FÒ(Fð !'Ðô‰Fõ &ä�6‹{˜aÔÙ ¬b¯j©jÔ9‘Ü˜F¤D×)Ò)ÙØ—M‘M“O©5°·±³ÈeÔ+Tô‘ñ   ›�ä�&œ)×$Ò$Ø˜Ô ØŸL™L×.Ñ.Ó0Õ1ˆFð —,‘,×*Ñ*¨3Ó/ˆÜ˜VŸ^™^¨WÓ5ˆ
àÐäˆs�8Š8Ø�x‰x‹zÐð �Z‰Zœ UˆZÓ+€FØÒÜ�}Š}˜VÓ,Ð,ä×!Ò! &´t¸F³|×7HÑ7HÌÏÉÓ7RÔSÐSrO   r™   )TNNN)FTN)TFFNT)ÚfirstN)TN)ró   Úaverager"  TFN)ró   FN)ÚleftN>   rŒ   r‹   rŠ   r‰   r…   r„   )ró   )NTFT)†Ú__doc__Ú
__future__r   rs  rU  Útypingr   r   r   r   r   r+  Únumpyr\   Úpandas._libsr   r	   rÒ   r
   r   Úpandas._libs.missingr   Úpandas._typingr   r   r   r   r   r   r   Úpandas.util._decoratorsr   Úpandas.util._exceptionsr   Úpandas.core.dtypes.castr   r   Úpandas.core.dtypes.commonr   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   Úpandas.core.dtypes.concatr)   Úpandas.core.dtypes.dtypesr*   r+   r,   r-   Úpandas.core.dtypes.genericr.   r/   r0   r1   r2   r3   r4   Úpandas.core.dtypes.missingr5   r6   Úpandas.core.array_algos.taker7   Úpandas.core.constructionr8   rÍ   r9   r:   Úpandas.core.indexersr;   r<   r=   r>   rž   r?   r@   rA   Úpandas.core.arraysrB   rC   rD   r_   rn   r�   ÚComplex128HashTableÚComplex64HashTableÚFloat64HashTableÚFloat32HashTableÚUInt64HashTableÚUInt32HashTableÚUInt16HashTableÚUInt8HashTableÚInt64HashTableÚInt32HashTableÚInt16HashTableÚInt8HashTableÚStringHashTableÚPyObjectHashTabler�   r’   r�   r›   rª   r    Úunique1drÐ   r»   rã   rá   r  r  r$  r'  r;  rA  rL  r_  rl  rì   rq  ru  r¦  r¸  rK   rO   rM   Ú<module>rÞ     s†  ðñõ
 #ã Û ÷õ ó ã ÷ó õ $÷÷ ñ õ /Ý 4÷÷÷ ÷ ÷ ó õ$ 4÷ó ÷÷ ñ ÷õ
 1÷ñ õ
 2ç÷ñ ÷ñ ÷
ñ
 	�˜5 ;Õ.°Õ?Ô@€AõK!õ\!,õHð: �&×,Ñ,Ø�×*Ñ*Øˆv×&Ñ&Øˆv×&Ñ&Øˆf×$Ñ$Øˆf×$Ñ$Øˆf×$Ñ$ØˆV×"Ñ"ØˆV×"Ñ"ØˆV×"Ñ"ØˆV×"Ñ"Ø
ˆF× Ñ Øˆf×$Ñ$Øˆf×&Ñ&ð€õ$õ(ð6 
Ü ó 
Ø Ø	Ü :ó 
Ø :ñ ˆHÓñi$ó ði$õX÷.,ð8 €ð "Ð õ^"÷B;ñ| ˆHÓöyó ðy÷x[÷~(÷>;÷:+÷\=ñJ Ð#Ó$ömó %ðm÷jQ=òp J€÷l÷lw3õtõõ,+÷^PTñ PTrO   