a
    DBìjó  ã                   @  sz   d dl mZ d dlZd dlmZmZmZ d dlmZ erdd dl	m
Z
 d dlZd dlmZ d dlmZ G dd	„ d	ejƒZdS )
é    )ÚannotationsN)ÚTYPE_CHECKINGÚCallableÚLiteral)Úlib)ÚSequence)ÚScalar)ÚSeriesc                	   @  s°  e Zd ZdZdd„ Zejd‡ddœdd„ƒZejdˆddddœdd„ƒZejd‰ddddœdd„ƒZ	ejdŠdd„ƒZ
ejd‹dd„ƒZejdŒdddddddœdd„ƒZejd d!œd"d#„ƒZejddejfdddd$d%œd&d'„ƒZejddejfdddd$d%œd(d)„ƒZejd�dd+œd,d-„ƒZejdŽdd.œd/d0„ƒZejd�dd.œd1d2„ƒZejd�ddœd3d4„ƒZejd5d6„ ƒZejd‘dd.œd7d8„ƒZejd’dd.œd9d:„ƒZejdd;œd<d=„ƒZejdd;œd>d?„ƒZejdd;œd@dA„ƒZejdBdC„ ƒZejd“dDdE„ƒZejd”dFdG„ƒZejdHdI„ ƒZejddJœdKdL„ƒZ ejd•dd;œdNdO„ƒZ!ejdPdQ„ ƒZ"ejdRdS„ ƒZ#ejdTdU„ ƒZ$ejdVdW„ ƒZ%ejdXdY„ ƒZ&ejdZd[„ ƒZ'ejd\d]„ ƒZ(ejd^d_„ ƒZ)ejd`da„ ƒZ*ejdbdc„ ƒZ+ejddde„ ƒZ,ejdfdg„ ƒZ-ejdhdi„ ƒZ.ejdjdk„ ƒZ/ejdldm„ ƒZ0ejdndo„ ƒZ1ejd–dpdq„ƒZ2ejd—drds„ƒZ3ejd˜dtdu„ƒZ4ejddvdwœdxdy„ƒZ5ejddvdzœd{d|„ƒZ6ejd™dd~dœd€d�„ƒZ7ejdšd‚dƒ„ƒZ8ejd›dddd„œd…d†„ƒZ9dS )œÚBaseStringArrayMethodsa  
    Base class for extension arrays implementing string methods.

    This is where our ExtensionArrays can override the implementation of
    Series.str.<method>. We don't expect this to work with
    3rd-party extension arrays.

    * User calls Series.str.<method>
    * pandas extracts the extension array from the Series
    * pandas calls ``extension_array._str_<method>(*args, **kwargs)``
    * pandas wraps the result, to return to the user.

    See :ref:`Series.str` for the docstring of each method.
    c                 C  s.   t |tƒr | j|j|j|jd�S |  |¡S d S )N)ÚstartÚstopÚstep)Ú
isinstanceÚsliceÚ
_str_slicer   r   r   Ú_str_get)ÚselfÚkey© r   úW/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pandas/core/strings/base.pyÚ_str_getitem%   s    
z#BaseStringArrayMethods._str_getitemr   Úint)Úflagsc                 C  s   d S ©Nr   ©r   Úpatr   r   r   r   Ú
_str_count+   s    z!BaseStringArrayMethods._str_countÚleftú z Literal['left', 'right', 'both']Ústr)ÚwidthÚsideÚfillcharc                 C  s   d S r   r   )r   r    r!   r"   r   r   r   Ú_str_pad/   s    zBaseStringArrayMethods._str_padTNÚbool)Úcaser   Úregexc                 C  s   d S r   r   )r   r   r%   r   Únar&   r   r   r   Ú_str_contains8   s    z$BaseStringArrayMethods._str_containsc                 C  s   d S r   r   ©r   r   r'   r   r   r   Ú_str_startswith>   s    z&BaseStringArrayMethods._str_startswithc                 C  s   d S r   r   r)   r   r   r   Ú_str_endswithB   s    z$BaseStringArrayMethods._str_endswithéÿÿÿÿzstr | re.Patternzstr | Callable)r   ÚreplÚnr%   r   r&   c                 C  s   d S r   r   )r   r   r-   r.   r%   r   r&   r   r   r   Ú_str_replaceF   s    
z#BaseStringArrayMethods._str_replacezint | Sequence[int])Úrepeatsc                 C  s   d S r   r   )r   r0   r   r   r   Ú_str_repeatR   s    z"BaseStringArrayMethods._str_repeatzScalar | lib.NoDefault)r   r%   r   r'   c                 C  s   d S r   r   ©r   r   r%   r   r'   r   r   r   Ú
_str_matchV   s    z!BaseStringArrayMethods._str_matchc                 C  s   d S r   r   r2   r   r   r   Ú_str_fullmatch`   s    z%BaseStringArrayMethods._str_fullmatchÚstrict)Úerrorsc                 C  s   d S r   r   )r   Úencodingr6   r   r   r   Ú_str_encodej   s    z"BaseStringArrayMethods._str_encode)r   c                 C  s   d S r   r   ©r   Úsubr   Úendr   r   r   Ú	_str_findn   s    z BaseStringArrayMethods._str_findc                 C  s   d S r   r   r9   r   r   r   Ú
_str_rfindr   s    z!BaseStringArrayMethods._str_rfindc                 C  s   d S r   r   r   r   r   r   Ú_str_findallv   s    z#BaseStringArrayMethods._str_findallc                 C  s   d S r   r   )r   Úir   r   r   r   z   s    zBaseStringArrayMethods._str_getc                 C  s   d S r   r   r9   r   r   r   Ú
_str_index~   s    z!BaseStringArrayMethods._str_indexc                 C  s   d S r   r   r9   r   r   r   Ú_str_rindex‚   s    z"BaseStringArrayMethods._str_rindex)Úsepc                 C  s   d S r   r   ©r   rB   r   r   r   Ú	_str_join†   s    z BaseStringArrayMethods._str_joinc                 C  s   d S r   r   ©r   rB   Úexpandr   r   r   Ú_str_partitionŠ   s    z%BaseStringArrayMethods._str_partitionc                 C  s   d S r   r   rE   r   r   r   Ú_str_rpartitionŽ   s    z&BaseStringArrayMethods._str_rpartitionc                 C  s   d S r   r   ©r   r   r   r   Ú_str_len’   s    zBaseStringArrayMethods._str_lenc                 C  s   d S r   r   )r   r   r   r   r   r   r   r   –   s    z!BaseStringArrayMethods._str_slicec                 C  s   d S r   r   )r   r   r   r-   r   r   r   Ú_str_slice_replaceš   s    z)BaseStringArrayMethods._str_slice_replacec                 C  s   d S r   r   )r   Útabler   r   r   Ú_str_translatež   s    z%BaseStringArrayMethods._str_translate)r    c                 K  s   d S r   r   )r   r    Úkwargsr   r   r   Ú	_str_wrap¢   s    z BaseStringArrayMethods._str_wrapú|c                 C  s   d S r   r   rC   r   r   r   Ú_str_get_dummies¦   s    z'BaseStringArrayMethods._str_get_dummiesc                 C  s   d S r   r   rI   r   r   r   Ú_str_isalnumª   s    z#BaseStringArrayMethods._str_isalnumc                 C  s   d S r   r   rI   r   r   r   Ú_str_isalpha®   s    z#BaseStringArrayMethods._str_isalphac                 C  s   d S r   r   rI   r   r   r   Ú_str_isdecimal²   s    z%BaseStringArrayMethods._str_isdecimalc                 C  s   d S r   r   rI   r   r   r   Ú_str_isdigit¶   s    z#BaseStringArrayMethods._str_isdigitc                 C  s   d S r   r   rI   r   r   r   Ú_str_islowerº   s    z#BaseStringArrayMethods._str_islowerc                 C  s   d S r   r   rI   r   r   r   Ú_str_isnumeric¾   s    z%BaseStringArrayMethods._str_isnumericc                 C  s   d S r   r   rI   r   r   r   Ú_str_isspaceÂ   s    z#BaseStringArrayMethods._str_isspacec                 C  s   d S r   r   rI   r   r   r   Ú_str_istitleÆ   s    z#BaseStringArrayMethods._str_istitlec                 C  s   d S r   r   rI   r   r   r   Ú_str_isupperÊ   s    z#BaseStringArrayMethods._str_isupperc                 C  s   d S r   r   rI   r   r   r   Ú_str_capitalizeÎ   s    z&BaseStringArrayMethods._str_capitalizec                 C  s   d S r   r   rI   r   r   r   Ú_str_casefoldÒ   s    z$BaseStringArrayMethods._str_casefoldc                 C  s   d S r   r   rI   r   r   r   Ú
_str_titleÖ   s    z!BaseStringArrayMethods._str_titlec                 C  s   d S r   r   rI   r   r   r   Ú_str_swapcaseÚ   s    z$BaseStringArrayMethods._str_swapcasec                 C  s   d S r   r   rI   r   r   r   Ú
_str_lowerÞ   s    z!BaseStringArrayMethods._str_lowerc                 C  s   d S r   r   rI   r   r   r   Ú
_str_upperâ   s    z!BaseStringArrayMethods._str_upperc                 C  s   d S r   r   )r   Úformr   r   r   Ú_str_normalizeæ   s    z%BaseStringArrayMethods._str_normalizec                 C  s   d S r   r   ©r   Zto_stripr   r   r   Ú
_str_stripê   s    z!BaseStringArrayMethods._str_stripc                 C  s   d S r   r   rc   r   r   r   Ú_str_lstripî   s    z"BaseStringArrayMethods._str_lstripc                 C  s   d S r   r   rc   r   r   r   Ú_str_rstripò   s    z"BaseStringArrayMethods._str_rstripr	   )ÚprefixÚreturnc                 C  s   d S r   r   )r   rg   r   r   r   Ú_str_removeprefixö   s    z(BaseStringArrayMethods._str_removeprefix)Úsuffixrh   c                 C  s   d S r   r   )r   rj   r   r   r   Ú_str_removesuffixú   s    z(BaseStringArrayMethods._str_removesuffixFzbool | None)rF   r&   c                 C  s   d S r   r   )r   r   r.   rF   r&   r   r   r   Ú
_str_splitþ   s    z!BaseStringArrayMethods._str_splitc                 C  s   d S r   r   )r   r   r.   r   r   r   Ú_str_rsplit  s    z"BaseStringArrayMethods._str_rsplit)r   r   rF   c                 C  s   d S r   r   )r   r   r   rF   r   r   r   Ú_str_extract  s    z#BaseStringArrayMethods._str_extract)r   )r   r   )Tr   NT)N)N)r,   Tr   T)r5   )r   N)r   N)r   )r   N)r   N)NNN)NNN)rP   )N)N)N)Nr,   FN)Nr,   )r   T):Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚabcÚabstractmethodr   r#   r(   r*   r+   r/   r1   r   Z
no_defaultr3   r4   r8   r<   r=   r>   r   r@   rA   rD   rG   rH   rJ   r   rK   rM   rO   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   rb   rd   re   rf   ri   rk   rl   rm   rn   r   r   r   r   r
      sä     ü ÿ    ùû	û	


















 ÿr
   )Ú
__future__r   rs   Útypingr   r   r   Zpandas._libsr   Úcollections.abcr   ÚreZpandas._typingr   Zpandasr	   ÚABCr
   r   r   r   r   Ú<module>   s   