ง
    q-Ph!  ใ                  ๓ช    d Z ddlmZ ddlZddlmZ ddlmZ  ej        e	ฆ  ซ        5  ddl
mZ dddฆ  ซ         n# 1 swxY w Y   erddlmZ d
d	ZdS )z~
Module containing the `len` function.

Keep this function in its own module to avoid conflicts with Python's built-in `len`.
้    )ฺannotationsN)ฺTYPE_CHECKING)ฺ	wrap_expr)ฺExprฺreturnr   c                 ๓B    t          t          j        ฆ   ซ         ฆ  ซ        S )u8  
    Return the number of rows in the context.

    This is similar to `COUNT(*)` in SQL.

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

    Examples
    --------
    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1, 2, None],
    ...         "b": [3, None, None],
    ...         "c": ["foo", "bar", "foo"],
    ...     }
    ... )
    >>> df.select(pl.len())
    shape: (1, 1)
    โโโโโโโ
    โ len โ
    โ --- โ
    โ u32 โ
    โโโโโโโก
    โ 3   โ
    โโโโโโโ

    Generate an index column by using `len` in conjunction with :func:`int_range`.

    >>> df.select(
    ...     pl.int_range(pl.len(), dtype=pl.UInt32).alias("index"),
    ...     pl.all(),
    ... )
    shape: (3, 4)
    โโโโโโโโโฌโโโโโโโฌโโโโโโโฌโโโโโโ
    โ index โ a    โ b    โ c   โ
    โ ---   โ ---  โ ---  โ --- โ
    โ u32   โ i64  โ i64  โ str โ
    โโโโโโโโโชโโโโโโโชโโโโโโโชโโโโโโก
    โ 0     โ 1    โ 3    โ foo โ
    โ 1     โ 2    โ null โ bar โ
    โ 2     โ null โ null โ foo โ
    โโโโโโโโโดโโโโโโโดโโโโโโโดโโโโโโ
    )r   ฺplrฺlenฉ ๓    ๚T/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/functions/len.pyr
   r
      s    ๕^ SWYYัิะr   )r   r   )ฺ__doc__ฺ
__future__r   ฺ
contextlibฺtypingr   ฺpolars._utils.wrapr   ฺsuppressฺImportErrorฺpolars.polarsฺpolarsr	   r   r
   r   r   r   ๚<module>r      s  ๐๐๐ ๐ #ะ "ะ "ะ "ะ "ะ "เ ะ ะ ะ ุ  ะ  ะ  ะ  ะ  ะ  เ (ะ (ะ (ะ (ะ (ะ (เZิั%ิ%๐  ๐  ุะะะะะ๐ ๐  ๐  ๑  ๔  ๐  ๐  ๐  ๐  ๐  ๐  ๘๘๘๐  ๐  ๐  ๐  ๐ ๐ ุะะะะะ๐/ ๐ / ๐ / ๐ / ๐ / ๐ / s   ฉ<ผA มA 