o
    ¹­§iS”  ã                   @  sz   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r4d dlm
Z
 d dlmZ d dlmZmZ G d	d
„ d
ƒZdS )é    )Úannotations)ÚSequence)ÚTYPE_CHECKING)Úparse_into_expression)Ú	wrap_expr)ÚCallable)ÚExpr)ÚIntoExprÚIntoExprColumnc                   @  s¦  e Zd ZdZdZdodd„Zdpd	d
„Z	dqddœdrdd„Zdsddœdtdd„Zdsddœdtdd„Z	dpdd„Z
dpdd„Zdpd d!„Zdudvd%d&„Zdudvd'd(„Zdpd)d*„Zdpd+d,„Zdd-œdwd/d0„Zdpd1d2„Zdpd3d4„Zdpd5d6„Zdpd7d8„Zddd9œdxd<d=„Zdpd>d?„Zdpd@dA„ZdpdBdC„ZddDœdydHdI„ZdpdJdK„ZdpdLdM„ZdNdOœdzdSdT„ZdNdNdUœd{dXdY„ZdNdZœd|d^d_„Zd}dadb„Z 	dqd~dedf„Z!duddgdh„Z"ddiœd€dkdl„Z#ddmdn„Z$dS )‚ÚExprArrayNameSpacez(Namespace for array related expressions.ZarrÚexprr   ÚreturnÚNonec                 C  s   |j | _ d S ©N)Ú_pyexpr©Úselfr   © r   úH/home/app/Keep/.python/lib/python3.10/site-packages/polars/expr/array.pyÚ__init__   s   zExprArrayNameSpace.__init__c                 C  ó   t | j ¡ ƒS )uò  
        Return the number of elements in each array.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.len())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ u32 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 2   â”‚
        â”‚ 2   â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_len©r   r   r   r   Úlen   ó   zExprArrayNameSpace.lenNF©Úas_arrayÚoffsetúint | str | ExprÚlengthúint | str | Expr | Noner   Úboolc                C  s0   t |ƒ}|durt |ƒnd}t| j |||¡ƒS )uù  
        Slice every subarray.

        Parameters
        ----------
        offset
            Start index. Negative indexing is supported.
        length
            Length of the slice. If set to `None` (default), the slice is taken to the
            end of the list.
        as_array
            Return result as a fixed-length `Array`, otherwise as a `List`.
            If true `length` and `offset` must be constant values.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.slice(0, 1))
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a         â”‚
        â”‚ ---       â”‚
        â”‚ list[i64] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1]       â”‚
        â”‚ [4]       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.slice(0, 1, as_array=True))
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”‚
        â”‚ ---           â”‚
        â”‚ array[i64, 1] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1]           â”‚
        â”‚ [4]           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        N)r   r   r   Z	arr_slice)r   r   r   r   Zoffset_pyexprZlength_pyexprr   r   r   Úslice/   s   4zExprArrayNameSpace.sliceé   Únc                C  s   | j d||dS )up  
        Get the first `n` elements of the sub-arrays.

        Parameters
        ----------
        n
            Number of values to return for each sublist.
        as_array
            Return result as a fixed-length `Array`, otherwise as a `List`.
            If true `n` must be a constant value.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.head(1))
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a         â”‚
        â”‚ ---       â”‚
        â”‚ list[i64] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1]       â”‚
        â”‚ [4]       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.head(1, as_array=True))
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”‚
        â”‚ ---           â”‚
        â”‚ array[i64, 1] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1]           â”‚
        â”‚ [4]           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        r   r   )r!   )r   r#   r   r   r   r   Úheadg   s   +zExprArrayNameSpace.headc                C  ó   t |ƒ}t| j ||¡ƒS )un  
        Slice the last `n` values of every sublist.

        Parameters
        ----------
        n
            Number of values to return for each sublist.
        as_array
            Return result as a fixed-length `Array`, otherwise as a `List`.
            If true `n` must be a constant value.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.tail(1))
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a         â”‚
        â”‚ ---       â”‚
        â”‚ list[i64] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [2]       â”‚
        â”‚ [3]       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.tail(1, as_array=True))
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”‚
        â”‚ ---           â”‚
        â”‚ array[i64, 1] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [2]           â”‚
        â”‚ [3]           â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   r   Zarr_tail)r   r#   r   Ún_pyexprr   r   r   Útail”   s   +zExprArrayNameSpace.tailc                 C  r   )uï  
        Compute the min values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.min())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ i64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 1   â”‚
        â”‚ 3   â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_minr   r   r   r   ÚminÂ   r   zExprArrayNameSpace.minc                 C  r   )uï  
        Compute the max values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.max())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ i64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 2   â”‚
        â”‚ 4   â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_maxr   r   r   r   ÚmaxÙ   r   zExprArrayNameSpace.maxc                 C  r   )uï  
        Compute the sum values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.sum())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ i64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 3   â”‚
        â”‚ 7   â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_sumr   r   r   r   Úsumð   r   zExprArrayNameSpace.sumé   ÚddofÚintc                 C  ó   t | j |¡ƒS )u<  
        Compute the std of the values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.std())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a        â”‚
        â”‚ ---      â”‚
        â”‚ f64      â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 0.707107 â”‚
        â”‚ 0.707107 â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_std©r   r,   r   r   r   Ústd  ó   zExprArrayNameSpace.stdc                 C  r.   )uö  
        Compute the var of the values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.var())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ f64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 0.5 â”‚
        â”‚ 0.5 â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_varr/   r   r   r   Úvar  r1   zExprArrayNameSpace.varc                 C  r   )uÿ  
        Compute the mean of the values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2, 3], [1, 1, 16]]},
        ...     schema={"a": pl.Array(pl.Int64, 3)},
        ... )
        >>> df.select(pl.col("a").arr.mean())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ f64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 2.0 â”‚
        â”‚ 6.0 â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_meanr   r   r   r   Úmean5  r   zExprArrayNameSpace.meanc                 C  r   )uü  
        Compute the median of the values of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [4, 3]]},
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.select(pl.col("a").arr.median())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ f64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 1.5 â”‚
        â”‚ 3.5 â”‚
        â””â”€â”€â”€â”€â”€â”˜
        )r   r   Z
arr_medianr   r   r   r   ÚmedianL  r   zExprArrayNameSpace.median)Úmaintain_orderr5   c                C  r.   )uÇ  
        Get the unique/distinct values in the array.

        Parameters
        ----------
        maintain_order
            Maintain order of data. This requires more work.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {
        ...         "a": [[1, 1, 2]],
        ...     },
        ...     schema={"a": pl.Array(pl.Int64, 3)},
        ... )
        >>> df.select(pl.col("a").arr.unique())
        shape: (1, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a         â”‚
        â”‚ ---       â”‚
        â”‚ list[i64] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2]    â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Z
arr_unique)r   r5   r   r   r   Úuniquec  s   zExprArrayNameSpace.uniquec                 C  r   )uh  
        Count the number of unique values in every sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {
        ...         "a": [[1, 1, 2], [2, 3, 4]],
        ...     },
        ...     schema={"a": pl.Array(pl.Int64, 3)},
        ... )
        >>> df.with_columns(n_unique=pl.col("a").arr.n_unique())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† n_unique â”‚
        â”‚ ---           â”† ---      â”‚
        â”‚ array[i64, 3] â”† u32      â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 1, 2]     â”† 2        â”‚
        â”‚ [2, 3, 4]     â”† 3        â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_n_uniquer   r   r   r   Ún_unique€  ó   zExprArrayNameSpace.n_uniquec                 C  r   )u¹  
        Convert an Array column into a List column with the same inner data type.

        Returns
        -------
        Expr
            Expression of data type :class:`List`.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={"a": [[1, 2], [3, 4]]},
        ...     schema={"a": pl.Array(pl.Int8, 2)},
        ... )
        >>> df.select(pl.col("a").arr.to_list())
        shape: (2, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a        â”‚
        â”‚ ---      â”‚
        â”‚ list[i8] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2]   â”‚
        â”‚ [3, 4]   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_to_listr   r   r   r   Úto_list™  s   zExprArrayNameSpace.to_listc                 C  r   )u…  
        Evaluate whether any boolean value is true for every subarray.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={
        ...         "a": [
        ...             [True, True],
        ...             [False, True],
        ...             [False, False],
        ...             [None, None],
        ...             None,
        ...         ]
        ...     },
        ...     schema={"a": pl.Array(pl.Boolean, 2)},
        ... )
        >>> df.with_columns(any=pl.col("a").arr.any())
        shape: (5, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a              â”† any   â”‚
        â”‚ ---            â”† ---   â”‚
        â”‚ array[bool, 2] â”† bool  â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
        â”‚ [true, true]   â”† true  â”‚
        â”‚ [false, true]  â”† true  â”‚
        â”‚ [false, false] â”† false â”‚
        â”‚ [null, null]   â”† false â”‚
        â”‚ null           â”† null  â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_anyr   r   r   r   Úanyµ  ó    zExprArrayNameSpace.anyc                 C  r   )u‡  
        Evaluate whether all boolean values are true for every subarray.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     data={
        ...         "a": [
        ...             [True, True],
        ...             [False, True],
        ...             [False, False],
        ...             [None, None],
        ...             None,
        ...         ]
        ...     },
        ...     schema={"a": pl.Array(pl.Boolean, 2)},
        ... )
        >>> df.with_columns(all=pl.col("a").arr.all())
        shape: (5, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a              â”† all   â”‚
        â”‚ ---            â”† ---   â”‚
        â”‚ array[bool, 2] â”† bool  â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
        â”‚ [true, true]   â”† true  â”‚
        â”‚ [false, true]  â”† false â”‚
        â”‚ [false, false] â”† false â”‚
        â”‚ [null, null]   â”† true  â”‚
        â”‚ null           â”† null  â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_allr   r   r   r   Úall×  r;   zExprArrayNameSpace.all)Ú
descendingÚ
nulls_lastr=   r>   c                C  s   t | j ||¡ƒS )u¸  
        Sort the arrays in this column.

        Parameters
        ----------
        descending
            Sort in descending order.
        nulls_last
            Place null values last.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {
        ...         "a": [[3, 2, 1], [9, 1, 2]],
        ...     },
        ...     schema={"a": pl.Array(pl.Int64, 3)},
        ... )
        >>> df.with_columns(sort=pl.col("a").arr.sort())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† sort          â”‚
        â”‚ ---           â”† ---           â”‚
        â”‚ array[i64, 3] â”† array[i64, 3] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [3, 2, 1]     â”† [1, 2, 3]     â”‚
        â”‚ [9, 1, 2]     â”† [1, 2, 9]     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df.with_columns(sort=pl.col("a").arr.sort(descending=True))
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† sort          â”‚
        â”‚ ---           â”† ---           â”‚
        â”‚ array[i64, 3] â”† array[i64, 3] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [3, 2, 1]     â”† [3, 2, 1]     â”‚
        â”‚ [9, 1, 2]     â”† [9, 2, 1]     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_sort)r   r=   r>   r   r   r   Úsortù  s   (zExprArrayNameSpace.sortc                 C  r   )u˜  
        Reverse the arrays in this column.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {
        ...         "a": [[3, 2, 1], [9, 1, 2]],
        ...     },
        ...     schema={"a": pl.Array(pl.Int64, 3)},
        ... )
        >>> df.with_columns(reverse=pl.col("a").arr.reverse())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† reverse       â”‚
        â”‚ ---           â”† ---           â”‚
        â”‚ array[i64, 3] â”† array[i64, 3] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [3, 2, 1]     â”† [1, 2, 3]     â”‚
        â”‚ [9, 1, 2]     â”† [2, 1, 9]     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_reverser   r   r   r   Úreverse#  r8   zExprArrayNameSpace.reversec                 C  r   )uô  
        Retrieve the index of the minimal value in every sub-array.

        Returns
        -------
        Expr
            Expression of data type :class:`UInt32` or :class:`UInt64`
            (depending on compilation).

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {
        ...         "a": [[1, 2], [2, 1]],
        ...     },
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.with_columns(arg_min=pl.col("a").arr.arg_min())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† arg_min â”‚
        â”‚ ---           â”† ---     â”‚
        â”‚ array[i64, 2] â”† u32     â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2]        â”† 0       â”‚
        â”‚ [2, 1]        â”† 1       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_arg_minr   r   r   r   Úarg_min<  ó   zExprArrayNameSpace.arg_minc                 C  r   )uô  
        Retrieve the index of the maximum value in every sub-array.

        Returns
        -------
        Expr
            Expression of data type :class:`UInt32` or :class:`UInt64`
            (depending on compilation).

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {
        ...         "a": [[1, 2], [2, 1]],
        ...     },
        ...     schema={"a": pl.Array(pl.Int64, 2)},
        ... )
        >>> df.with_columns(arg_max=pl.col("a").arr.arg_max())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† arg_max â”‚
        â”‚ ---           â”† ---     â”‚
        â”‚ array[i64, 2] â”† u32     â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2]        â”† 1       â”‚
        â”‚ [2, 1]        â”† 0       â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   Zarr_arg_maxr   r   r   r   Úarg_max[  rB   zExprArrayNameSpace.arg_max©Únull_on_oobÚindexúint | IntoExprColumnrE   c                C  r%   )uk  
        Get the value by index in the sub-arrays.

        So index `0` would return the first item of every sublist
        and index `-1` would return the last item of every sublist
        if an index is out of bounds, it will return a `None`.

        Parameters
        ----------
        index
            Index to return per sub-array
        null_on_oob
            Behavior if an index is out of bounds:
            True -> set as null
            False -> raise an error

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"arr": [[1, 2, 3], [4, 5, 6], [7, 8, 9]], "idx": [1, -2, 0]},
        ...     schema={"arr": pl.Array(pl.Int32, 3), "idx": pl.Int32},
        ... )
        >>> df.with_columns(get=pl.col("arr").arr.get("idx", null_on_oob=True))
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
        â”‚ arr           â”† idx â”† get â”‚
        â”‚ ---           â”† --- â”† --- â”‚
        â”‚ array[i32, 3] â”† i32 â”† i32 â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
        â”‚ [1, 2, 3]     â”† 1   â”† 2   â”‚
        â”‚ [4, 5, 6]     â”† -2  â”† 5   â”‚
        â”‚ [7, 8, 9]     â”† 0   â”† 7   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
        )r   r   r   Zarr_get)r   rF   rE   Zindex_pyexprr   r   r   Úgetz  s   #zExprArrayNameSpace.getc                 C  ó   | j dddS )u4  
        Get the first value of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"a": [[1, 2, 3], [4, 5, 6], [7, 8, 9]]},
        ...     schema={"a": pl.Array(pl.Int32, 3)},
        ... )
        >>> df.with_columns(first=pl.col("a").arr.first())
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† first â”‚
        â”‚ ---           â”† ---   â”‚
        â”‚ array[i32, 3] â”† i32   â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
        â”‚ [1, 2, 3]     â”† 1     â”‚
        â”‚ [4, 5, 6]     â”† 4     â”‚
        â”‚ [7, 8, 9]     â”† 7     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
        r   TrD   ©rH   r   r   r   r   Úfirst   ó   zExprArrayNameSpace.firstc                 C  rI   )u"  
        Get the last value of the sub-arrays.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"a": [[1, 2, 3], [4, 5, 6], [7, 9, 8]]},
        ...     schema={"a": pl.Array(pl.Int32, 3)},
        ... )
        >>> df.with_columns(last=pl.col("a").arr.last())
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† last â”‚
        â”‚ ---           â”† ---  â”‚
        â”‚ array[i32, 3] â”† i32  â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
        â”‚ [1, 2, 3]     â”† 3    â”‚
        â”‚ [4, 5, 6]     â”† 6    â”‚
        â”‚ [7, 9, 8]     â”† 8    â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
        éÿÿÿÿTrD   rJ   r   r   r   r   Úlast¸  rL   zExprArrayNameSpace.lastT)Úignore_nullsÚ	separatorr
   rO   c                C  ó   t |dd}t| j ||¡ƒS )u  
        Join all string items in a sub-array and place a separator between them.

        This errors if inner type of array `!= String`.

        Parameters
        ----------
        separator
            string to separate the items with
        ignore_nulls
            Ignore null values (default).

            If set to ``False``, null values will be propagated.
            If the sub-list contains any null values, the output is ``None``.

        Returns
        -------
        Expr
            Expression of data type :class:`String`.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"s": [["a", "b"], ["x", "y"]], "separator": ["*", "_"]},
        ...     schema={
        ...         "s": pl.Array(pl.String, 2),
        ...         "separator": pl.String,
        ...     },
        ... )
        >>> df.with_columns(join=pl.col("s").arr.join(pl.col("separator")))
        shape: (2, 3)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
        â”‚ s             â”† separator â”† join â”‚
        â”‚ ---           â”† ---       â”† ---  â”‚
        â”‚ array[str, 2] â”† str       â”† str  â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
        â”‚ ["a", "b"]    â”† *         â”† a*b  â”‚
        â”‚ ["x", "y"]    â”† _         â”† x_y  â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
        T©Z
str_as_lit)r   r   r   Zarr_join)r   rP   rO   Zseparator_pyexprr   r   r   ÚjoinÐ  s   )zExprArrayNameSpace.join©Úempty_as_nullÚ
keep_nullsrU   rV   c                C  s   t | jj||dƒS )uj  
        Returns a column with a separate row for every array element.

        Parameters
        ----------
        empty_as_null
            Explode an empty array into a `null`.
        keep_nulls
            Explode a `null` array into a `null`.

        Returns
        -------
        Expr
            Expression with the data type of the array elements.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"a": [[1, 2, 3], [4, 5, 6]]}, schema={"a": pl.Array(pl.Int64, 3)}
        ... )
        >>> df.select(pl.col("a").arr.explode())
        shape: (6, 1)
        â”Œâ”€â”€â”€â”€â”€â”
        â”‚ a   â”‚
        â”‚ --- â”‚
        â”‚ i64 â”‚
        â•žâ•â•â•â•â•â•¡
        â”‚ 1   â”‚
        â”‚ 2   â”‚
        â”‚ 3   â”‚
        â”‚ 4   â”‚
        â”‚ 5   â”‚
        â”‚ 6   â”‚
        â””â”€â”€â”€â”€â”€â”˜
        rT   )r   r   Zarr_explode)r   rU   rV   r   r   r   Úexplodeü  s   $ÿzExprArrayNameSpace.explode)Únulls_equalÚitemr	   rX   c                C  rQ   )u¾  
        Check if sub-arrays contain the given item.

        Parameters
        ----------
        item
            Item that will be checked for membership
        nulls_equal : bool, default True
            If True, treat null as a distinct value. Null values will not propagate.

        Returns
        -------
        Expr
            Expression of data type :class:`Boolean`.

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"a": [["a", "b"], ["x", "y"], ["a", "c"]]},
        ...     schema={"a": pl.Array(pl.String, 2)},
        ... )
        >>> df.with_columns(contains=pl.col("a").arr.contains("a"))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† contains â”‚
        â”‚ ---           â”† ---      â”‚
        â”‚ array[str, 2] â”† bool     â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ ["a", "b"]    â”† true     â”‚
        â”‚ ["x", "y"]    â”† false    â”‚
        â”‚ ["a", "c"]    â”† true     â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        TrR   )r   r   r   Zarr_contains)r   rY   rX   Zitem_pyexprr   r   r   Úcontains$  s   "zExprArrayNameSpace.containsÚelementc                 C  s   t |dd}t| j |¡ƒS )u2  
        Count how often the value produced by `element` occurs.

        Parameters
        ----------
        element
            An expression that produces a single value

        Examples
        --------
        >>> df = pl.DataFrame(
        ...     {"a": [[1, 2], [1, 1], [2, 2]]}, schema={"a": pl.Array(pl.Int64, 2)}
        ... )
        >>> df.with_columns(number_of_twos=pl.col("a").arr.count_matches(2))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† number_of_twos â”‚
        â”‚ ---           â”† ---            â”‚
        â”‚ array[i64, 2] â”† u32            â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2]        â”† 1              â”‚
        â”‚ [1, 1]        â”† 0              â”‚
        â”‚ [2, 2]        â”† 2              â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        TrR   )r   r   r   Zarr_count_matches)r   r[   Zelement_pyexprr   r   r   Úcount_matchesI  s   z ExprArrayNameSpace.count_matchesÚfieldsú+Sequence[str] | Callable[[int], str] | Nonec                 C  sB   t |tƒrt|ƒ}| j d¡}t|ƒj |¡S | j |¡}t|ƒS )uÆ  
        Convert the Series of type `Array` to a Series of type `Struct`.

        Parameters
        ----------
        fields
            If the name and number of the desired fields is known in advance
            a list of field names can be given, which will be assigned by index.
            Otherwise, to dynamically assign field names, a custom function can be
            used; if neither are set, fields will be `field_0, field_1 .. field_n`.

        Examples
        --------
        Convert array to struct with default field name assignment:

        >>> df = pl.DataFrame(
        ...     {"n": [[0, 1, 2], [3, 4, 5]]}, schema={"n": pl.Array(pl.Int8, 3)}
        ... )
        >>> df.with_columns(struct=pl.col("n").arr.to_struct())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ n            â”† struct    â”‚
        â”‚ ---          â”† ---       â”‚
        â”‚ array[i8, 3] â”† struct[3] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [0, 1, 2]    â”† {0,1,2}   â”‚
        â”‚ [3, 4, 5]    â”† {3,4,5}   â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        Convert array to struct with field name assignment by function/index:

        >>> df = pl.DataFrame(
        ...     {"n": [[0, 1, 2], [3, 4, 5]]}, schema={"n": pl.Array(pl.Int8, 3)}
        ... )
        >>> df.select(pl.col("n").arr.to_struct(fields=lambda idx: f"n{idx}")).rows(
        ...     named=True
        ... )
        [{'n': {'n0': 0, 'n1': 1, 'n2': 2}}, {'n': {'n0': 3, 'n1': 4, 'n2': 5}}]

        Convert array to struct with field name assignment by
        index from a list of names:

        >>> df.select(pl.col("n").arr.to_struct(fields=["c1", "c2", "c3"])).rows(
        ...     named=True
        ... )
        [{'n': {'c1': 0, 'c2': 1, 'c3': 2}}, {'n': {'c1': 3, 'c2': 4, 'c3': 5}}]
        N)Ú
isinstancer   Úlistr   Zarr_to_structr   ÚstructZrename_fields)r   r]   Úfield_namesZpyexprr   r   r   Ú	to_structf  s   
2zExprArrayNameSpace.to_structc                 C  s   t |ƒ}t| j |¡ƒS )u  
        Shift array values by the given number of indices.

        Parameters
        ----------
        n
            Number of indices to shift forward. If a negative value is passed, values
            are shifted in the opposite direction instead.

        Notes
        -----
        This method is similar to the `LAG` operation in SQL when the value for `n`
        is positive. With a negative value for `n`, it is similar to `LEAD`.

        Examples
        --------
        By default, array values are shifted forward by one index.

        >>> df = pl.DataFrame(
        ...     {"a": [[1, 2, 3], [4, 5, 6]]}, schema={"a": pl.Array(pl.Int64, 3)}
        ... )
        >>> df.with_columns(shift=pl.col("a").arr.shift())
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† shift         â”‚
        â”‚ ---           â”† ---           â”‚
        â”‚ array[i64, 3] â”† array[i64, 3] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2, 3]     â”† [null, 1, 2]  â”‚
        â”‚ [4, 5, 6]     â”† [null, 4, 5]  â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        Pass a negative value to shift in the opposite direction instead.

        >>> df.with_columns(shift=pl.col("a").arr.shift(-2))
        shape: (2, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† shift           â”‚
        â”‚ ---           â”† ---             â”‚
        â”‚ array[i64, 3] â”† array[i64, 3]   â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, 2, 3]     â”† [3, null, null] â”‚
        â”‚ [4, 5, 6]     â”† [6, null, null] â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   r   r   Z	arr_shift)r   r#   r&   r   r   r   Úshift   s   .zExprArrayNameSpace.shift©Úas_listrf   c                C  s   t | jj|j|dƒS )u  
        Run any polars expression against the arrays' elements.

        Parameters
        ----------
        expr
            Expression to run. Note that you can select an element with `pl.element()`
        as_list
            Collect the resulting data as a list. This allows for expressions which
            output a variable amount of data.

        Examples
        --------
        >>> df = pl.DataFrame({"a": [1, 8, 3], "b": [4, 5, 2]})
        >>> df.with_columns(rank=pl.concat_arr("a", "b").arr.eval(pl.element().rank()))
        shape: (3, 3)
        â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a   â”† b   â”† rank          â”‚
        â”‚ --- â”† --- â”† ---           â”‚
        â”‚ i64 â”† i64 â”† array[f64, 2] â”‚
        â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ 1   â”† 4   â”† [1.0, 2.0]    â”‚
        â”‚ 8   â”† 5   â”† [2.0, 1.0]    â”‚
        â”‚ 3   â”† 2   â”† [2.0, 1.0]    â”‚
        â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        See Also
        --------
        polars.Expr.arr.agg: Evaluate any expression and automatically explode.
        polars.Expr.list.eval: Same for the List datatype.
        re   )r   r   Zarr_eval)r   r   rf   r   r   r   ÚevalÑ  s    zExprArrayNameSpace.evalc                 C  s   t | j |j¡ƒS )uh  
        Run any polars aggregation expression against the arrays' elements.

        Parameters
        ----------
        expr
            Expression to run. Note that you can select an element with `pl.element()`.

        Examples
        --------
        >>> df = pl.Series(
        ...     "a", [[1, None], [42, 13], [None, None]], pl.Array(pl.Int64, 2)
        ... ).to_frame()
        >>> df.with_columns(null_count=pl.col.a.arr.agg(pl.element().null_count()))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† null_count â”‚
        â”‚ ---           â”† ---        â”‚
        â”‚ array[i64, 2] â”† u32        â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, null]     â”† 1          â”‚
        â”‚ [42, 13]      â”† 0          â”‚
        â”‚ [null, null]  â”† 2          â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
        >>> df.with_columns(no_nulls=pl.col.a.arr.agg(pl.element().drop_nulls()))
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
        â”‚ a             â”† no_nulls  â”‚
        â”‚ ---           â”† ---       â”‚
        â”‚ array[i64, 2] â”† list[i64] â”‚
        â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•¡
        â”‚ [1, null]     â”† [1]       â”‚
        â”‚ [42, 13]      â”† [42, 13]  â”‚
        â”‚ [null, null]  â”† []        â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

        See Also
        --------
        polars.Expr.arr.eval: Evaluate any expression without automatic explode.
        polars.Expr.list.agg: Same for the List datatype.
        )r   r   Zarr_aggr   r   r   r   Úaggó  s   *zExprArrayNameSpace.agg)r   r   r   r   )r   r   r   )r   r   r   r   r   r    r   r   )r"   )r#   r   r   r    r   r   )r+   )r,   r-   r   r   )r5   r    r   r   )r=   r    r>   r    r   r   )rF   rG   rE   r    r   r   )rP   r
   rO   r    r   r   )rU   r    rV   r    r   r   )rY   r	   rX   r    r   r   )r[   r	   r   r   )r]   r^   r   r   )r#   rG   r   r   )r   r   rf   r    r   r   )r   r   r   r   )%Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	_accessorr   r   r!   r$   r'   r(   r)   r*   r0   r2   r3   r4   r6   r7   r9   r:   r<   r?   r@   rA   rC   rH   rK   rN   rS   rW   rZ   r\   rc   rd   rg   rh   r   r   r   r   r      sN    

ýû8-
.







""
*


&
,(
%ÿ:1"r   N)Ú
__future__r   Úcollections.abcr   Útypingr   Zpolars._utils.parser   Zpolars._utils.wrapr   r   Zpolarsr   Zpolars._typingr	   r
   r   r   r   r   r   Ú<module>   s    