ó
    Ñ]j»  ã                  ó@  • S 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  SSKr\R                  (       a  SSKJr  0 SS_S	S
_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_S S!_S"S#_S$S%_S&S'_S(S)S*S+S,S-S.S/S0S1S2S3S4S5.Er " S6 S75      r " S8 S95      rS<S: jrS=S; jrg)>zE
Utility functions and objects for implementing the interchange API.
é    )ÚannotationsN)Úlib)Ú
ArrowDtypeÚCategoricalDtypeÚDatetimeTZDtype)ÚDtypeObjÚnullÚnÚboolÚbÚuint8ÚCÚuint16ÚSÚuint32ÚIÚuint64ÚLÚint8ÚcÚint16Úint32ÚiÚint64ÚlÚ	halffloatÚeÚfloatÚfÚdoubleÚgÚstringÚuÚlarge_stringÚUÚbinaryÚzz	time32[s]ÚttsÚttmÚttuÚttnÚtdDÚtdmztss:ztsm:ztsu:ztsn:ÚtDsÚtDmÚtDuÚtDn)z
time32[ms]z
time64[us]z
time64[ns]zdate32[day]z
date64[ms]ztimestamp[s]ztimestamp[ms]ztimestamp[us]ztimestamp[ns]zduration[s]zduration[ms]zduration[us]zduration[ns]c                  ód   • \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSrSrSrSrSrSrSrSrSrSrg)ÚArrowCTypesé=   z©
Enum for Apache Arrow C type format strings.

The Arrow C data interface:
https://arrow.apache.org/docs/format/CDataInterface.html#data-type-description-format-strings
r
   r   r   r   Úsr   r   r   r   r   r   r   r!   r#   r%   r,   r-   zts{resolution}:{tz}ztt{resolution}© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚNULLÚBOOLÚINT8ÚUINT8ÚINT16ÚUINT16ÚINT32ÚUINT32ÚINT64ÚUINT64ÚFLOAT16ÚFLOAT32ÚFLOAT64ÚSTRINGÚLARGE_STRINGÚDATE32ÚDATE64Ú	TIMESTAMPÚTIMEÚ__static_attributes__r6   ó    ÚZ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/core/interchange/utils.pyr3   r3   =   sj   † ñð €DØ€DØ€DØ€EØ€EØ€FØ€EØ€FØ€EØ€FØ€GØ€GØ€GØ€FØ€LØ€FØ€Fð &€IØƒDrP   r3   c                  ó(   • \ rS rSrSrSrSrSrSrSr	g)	Ú
Endiannessé_   z.Enum indicating the byte-order of a data-type.Ú<Ú>Ú=Ú|r6   N)
r7   r8   r9   r:   r;   ÚLITTLEÚBIGÚNATIVEÚNArO   r6   rP   rQ   rS   rS   _   s   † Ù8à€FØ
€CØ€FØ	ƒBrP   rS   c                ó¸  • [        U [        5      (       a  [        R                  $ U [        R
                  " S5      :X  a  [        R                  $ [        U [        5      (       a¼  SSKnU R                  nUR                  R                  U5      (       a  SUR                   SUR                   3$ UR                  R                  U5      (       a,  UR                  b  SUR                   S    SUR                   3$ ["        R%                  ['        U5      S5      nUb  U$ [)        [        U R*                  R-                  5       S5      nUb  U$ [        U [.        R0                  5      (       a  [        R                  $ [2        R4                  " U S5      (       a:  [        R6                  " U 5      S   S   n[        R8                  R;                  US	S
9$ [        U [<        5      (       a5  [        R8                  R;                  U R                   S   U R                  S
9$ [        U [.        R>                  5      (       a  [        R@                  $ [C        SU  S35      e)zø
Represent pandas `dtype` as a format string in Apache Arrow C notation.

Parameters
----------
dtype : np.dtype
    Datatype of pandas DataFrame to represent.

Returns
-------
str
    Format string in Apache Arrow C notation of the given `dtype`.
ÚOr   Nzd:Ú,ÚtsÚ:ÚMÚ )Ú
resolutionÚtzzConversion of z- to Arrow C format string is not implemented.)"Ú
isinstancer   r3   rD   ÚnpÚdtyperI   r   ÚpyarrowÚpyarrow_dtypeÚtypesÚ
is_decimalÚ	precisionÚscaleÚis_timestampre   ÚunitÚPYARROW_CTYPESÚgetÚstrÚgetattrÚnameÚupperÚpdÚStringDtyper   Úis_np_dtypeÚdatetime_datarM   Úformatr   ÚBooleanDtyper=   ÚNotImplementedError)rh   ÚpaÚpa_typeÚ
format_strrd   s        rQ   Údtype_to_arrow_c_fmtr�   h   sã  € ô �%Ô)×*Ñ*Ü× Ñ Ð Ø	”"—(’(˜3“-Ó	Ü×!Ñ!Ð!Ü	�Eœ:×	&Ñ	&Ûà×%Ñ%ˆØ�8‰8×Ñ˜w×'Ñ'Ø˜×)Ñ)Ð*¨!¨G¯M©M¨?Ð;Ð;Ø�X‰X×"Ñ" 7×+Ñ+°·
±
Ñ0FØ˜Ÿ™ Q™Ð(¨¨'¯*©*¨Ð6Ð6Ü#×'Ñ'¬¨G«°dÓ;ˆ
ØÑ!ØÐäœ e§j¡j×&6Ñ&6Ó&8¸$Ó?€JØÑØÐä�%œŸ™×(Ñ(ô ×!Ñ!Ð!ä	�Š˜ ×	$Ñ	$ô ×%Ò% eÓ,¨QÑ/°Ñ2ˆ
Ü×$Ñ$×+Ñ+°zÀbÐ+ÐIÐIä	�Eœ?×	+Ñ	+Ü×$Ñ$×+Ñ+°u·z±zÀ!±}ÈÏÉÐ+ÐRÐRä	�Eœ2Ÿ?™?×	+Ñ	+Ü×ÑÐä
Ø
˜˜ÐLÐMóð rP   c               ób  • [        U R                  [        R                  5      (       d  gU R                  R
                  n[        UR                  5      S:X  a  gU(       d  [        S5      eUR                  5       n[        R                  " X0R                  U R                  U R                  S9$ )a«  
Rechunk a multi-chunk pyarrow array into a single-chunk array, if necessary.

- Returns `None` if the input series is not backed by a multi-chunk pyarrow array
  (and so doesn't need rechunking)
- Returns a single-chunk-backed-Series if the input is backed by a multi-chunk
  pyarrow array and `allow_copy` is `True`.
- Raises a `RuntimeError` if `allow_copy` is `False` and input is a
  based by a multi-chunk pyarrow array.
Né   zŒFound multi-chunk pyarrow array, but `allow_copy` is False. Please rechunk the array before calling this function, or set `allow_copy=True`.)rh   ru   Úindex)rf   rh   rw   r   ÚarrayÚ	_pa_arrayÚlenÚchunksÚRuntimeErrorÚcombine_chunksÚSeriesru   r„   )ÚseriesÚ
allow_copyÚchunked_arrayÚarrs       rQ   Úmaybe_rechunkr�       s…   € ô �f—l‘l¤B§M¡M×2Ñ2ØØ—L‘L×*Ñ*€MÜ
ˆ=×ÑÓ  AÓ%ØÞÜð!ó
ð 	
ð
 ×
&Ñ
&Ó
(€CÜ�9Š9�S§¡°6·;±;ÀfÇlÁlÑSÐSrP   )rh   r   Úreturnrs   )rŒ   z	pd.Seriesr�   r   r‘   zpd.Series | None)r;   Ú
__future__r   ÚtypingÚnumpyrg   Úpandas._libsr   Úpandas.core.dtypes.dtypesr   r   r   Úpandasrw   ÚTYPE_CHECKINGÚpandas._typingr   rq   r3   rS   r�   r�   r6   rP   rQ   Ú<module>rš      sR  ðñõ #ã ã å ÷ñ ó à	××Ý'ð
Ø
ˆCðà
ˆCðð ˆSðð ˆcð	ð
 ˆcðð ˆcðð ˆCðð ˆSðð ˆSðð ˆSðð �ðð ˆSðð ˆcðð ˆcðð �Cðð  ˆcð!ð" �ð#ð$ ØØØØØØØØØØØØò=€÷Dñ ÷Dñ ô5õpTrP   