
    j                        d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ erd dlmZ d dlmZ d d	lmZ e G d
 d                      ZdS )    )annotations)TYPE_CHECKING)	datatypes)unstable)wrap_s)expr_dispatch)Series)PySeries)PolarsDataTypec                  n    e Zd ZdZdZddZ e            dd
            Z e            dd            ZdS )ExtensionNameSpacezSeries.ext namespace.extseriesr	   returnNonec                    |j         | _         d S )N)_s)selfr   s     V/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/polars/series/ext.py__init__zExtensionNameSpace.__init__   s    "I    dtyper   c                    t          |t          j                  sJ t          | j                            |                    S )a>  
        Create a Series with an extension `dtype`.

        The input series must have the storage type of the extension dtype.

        .. warning::
            This functionality is currently considered **unstable**. It may be
            changed at any point without it being considered a breaking change.
        )
isinstancedtBaseExtensionr   r   ext_to)r   r   s     r   tozExtensionNameSpace.to   s9     %!122222dgnnU++,,,r   c                N    t          | j                                                  S )a_  
        Get the storage values of a Series with an extension data type.

        If the input series does not have an extension data type, it is returned as-is.

        .. warning::
            This functionality is currently considered **unstable**. It may be
            changed at any point without it being considered a breaking change.
        )r   r   ext_storage)r   s    r   storagezExtensionNameSpace.storage)   s      dg))++,,,r   N)r   r	   r   r   )r   r   r   r	   )r   r	   )	__name__
__module____qualname____doc__	_accessorr   r   r   r!    r   r   r   r      s        I& & & & XZZ- - - Z- XZZ
- 
- 
- Z
- 
- 
-r   r   N)
__future__r   typingr   polarsr   r   polars._utils.unstabler   polars._utils.wrapr   polars.series.utilsr   r	   polars._plrr
   polars._typingr   r   r'   r   r   <module>r0      s    " " " " " "             " " " " " " + + + + + + % % % % % % - - - - - - $$$$$$     
 !- !- !- !- !- !- !- !- !- !-r   