§
    q-Ph<  ã                  óv   — d dl mZ d dlmZ d dlmZ erd dlmZ ddœdd„Z	ddœdd„Z
dd„Zdd„Zdd„Zdd„ZdS )é    )Úannotations)ÚTYPE_CHECKINGN)ÚExprT©Úignore_nullsÚnamesÚstrr   ÚboolÚreturnr   c                ór   — |st          j        d¦  «        S t          j        |Ž                      | ¬¦  «        S )u¥  
    Either return an expression representing all columns, or evaluate a bitwise AND operation.

    If no arguments are passed, this function is syntactic sugar for `col("*")`.
    Otherwise, this function is syntactic sugar for `col(names).all()`.

    Parameters
    ----------
    *names
        Name(s) of the columns to use in the aggregation.
    ignore_nulls
        Ignore null values (default).

        If set to `False`, `Kleene logic`_ is used to deal with nulls:
        if the column contains any null values and no `False` values,
        the output is null.

        .. _Kleene logic: https://en.wikipedia.org/wiki/Three-valued_logic

    See Also
    --------
    all_horizontal

    Examples
    --------
    Selecting all columns.

    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [True, False, True],
    ...         "b": [False, False, False],
    ...     }
    ... )
    >>> df.select(pl.all().sum())
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a   â”† b   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ u32 â”† u32 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 2   â”† 0   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Evaluate bitwise AND for a column.

    >>> df.select(pl.all("a"))
    shape: (1, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”
    â”‚ a     â”‚
    â”‚ ---   â”‚
    â”‚ bool  â”‚
    â•žâ•â•â•â•â•â•â•â•¡
    â”‚ false â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”˜
    Ú*r   )ÚFÚcolÚall©r   r   s     úe/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/functions/aggregation/vertical.pyr   r      s8   € ðp ð ÝŒuS‰zŒzÐåŒ5%ˆ=×Ò¨,ÐÑ7Ô7Ð7ó    úExpr | bool | Nonec                óF   — t          j        |Ž                      | ¬¦  «        S )u“  
    Evaluate a bitwise OR operation.

    Syntactic sugar for `col(names).any()`.

    See Also
    --------
    any_horizontal

    Parameters
    ----------
    *names
        Name(s) of the columns to use in the aggregation.
    ignore_nulls
        Ignore null values (default).

        If set to `False`, `Kleene logic`_ is used to deal with nulls:
        if the column contains any null values and no `True` values,
        the output is null.

        .. _Kleene logic: https://en.wikipedia.org/wiki/Three-valued_logic

    Examples
    --------
    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [True, False, True],
    ...         "b": [False, False, False],
    ...     }
    ... )
    >>> df.select(pl.any("a"))
    shape: (1, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”
    â”‚ a    â”‚
    â”‚ ---  â”‚
    â”‚ bool â”‚
    â•žâ•â•â•â•â•â•â•¡
    â”‚ true â”‚
    â””â”€â”€â”€â”€â”€â”€â”˜
    r   )r   r   Úanyr   s     r   r   r   I   s"   € õR Œ5%ˆ=×Ò¨,ÐÑ7Ô7Ð7r   c                 óB   — t          j        | Ž                      ¦   «         S )uò  
    Get the maximum value.

    Syntactic sugar for `col(names).max()`.

    Parameters
    ----------
    *names
        Name(s) of the columns to use in the aggregation.

    See Also
    --------
    max_horizontal

    Examples
    --------
    Get the maximum value of a column.

    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1, 8, 3],
    ...         "b": [4, 5, 2],
    ...         "c": ["foo", "bar", "foo"],
    ...     }
    ... )
    >>> df.select(pl.max("a"))
    shape: (1, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ a   â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 8   â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Get the maximum value of multiple columns.

    >>> df.select(pl.max("^a|b$"))
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a   â”† b   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 8   â”† 5   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    >>> df.select(pl.max("a", "b"))
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a   â”† b   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 8   â”† 5   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r   r   Úmax©r   s    r   r   r   u   ó   € õr Œ5%ˆ=×ÒÑÔÐr   c                 óB   — t          j        | Ž                      ¦   «         S )uò  
    Get the minimum value.

    Syntactic sugar for `col(names).min()`.

    Parameters
    ----------
    *names
        Name(s) of the columns to use in the aggregation.

    See Also
    --------
    min_horizontal

    Examples
    --------
    Get the minimum value of a column.

    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1, 8, 3],
    ...         "b": [4, 5, 2],
    ...         "c": ["foo", "bar", "foo"],
    ...     }
    ... )
    >>> df.select(pl.min("a"))
    shape: (1, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ a   â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 1   â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Get the minimum value of multiple columns.

    >>> df.select(pl.min("^a|b$"))
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a   â”† b   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 1   â”† 2   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    >>> df.select(pl.min("a", "b"))
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a   â”† b   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 1   â”† 2   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r   r   Úminr   s    r   r   r   ±   r   r   c                 óB   — t          j        | Ž                      ¦   «         S )u®  
    Sum all values.

    Syntactic sugar for `col(name).sum()`.

    Parameters
    ----------
    *names
        Name(s) of the columns to use in the aggregation.

    See Also
    --------
    sum_horizontal

    Examples
    --------
    Sum a column.

    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1, 2],
    ...         "b": [3, 4],
    ...         "c": [5, 6],
    ...     }
    ... )
    >>> df.select(pl.sum("a"))
    shape: (1, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ a   â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 3   â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Sum multiple columns.

    >>> df.select(pl.sum("a", "c"))
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a   â”† c   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 3   â”† 11  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    >>> df.select(pl.sum("^.*[bc]$"))
    shape: (1, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ b   â”† c   â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 7   â”† 11  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r   r   Úsumr   s    r   r   r   í   r   r   c                 óB   — t          j        | Ž                      ¦   «         S )uk  
    Cumulatively sum all values.

    Syntactic sugar for `col(names).cum_sum()`.

    Parameters
    ----------
    *names
        Name(s) of the columns to use in the aggregation.

    See Also
    --------
    cumsum_horizontal

    Examples
    --------
    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1, 2, 3],
    ...         "b": [4, 5, 6],
    ...     }
    ... )
    >>> df.select(pl.cum_sum("a"))
    shape: (3, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ a   â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 1   â”‚
    â”‚ 3   â”‚
    â”‚ 6   â”‚
    â””â”€â”€â”€â”€â”€â”˜
    )r   r   Úcum_sumr   s    r   r    r    )  s   € õF Œ5%ˆ=× Ò Ñ"Ô"Ð"r   )r   r	   r   r
   r   r   )r   r	   r   r
   r   r   )r   r	   r   r   )Ú
__future__r   Útypingr   Úpolars.functionsÚ	functionsr   Úpolarsr   r   r   r   r   r   r    © r   r   ú<module>r'      sú   ðØ "Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð àð ØÐÐÐÐÐð +/ð ;8ð ;8ð ;8ð ;8ð ;8ð ;8ð| +/ð )8ð )8ð )8ð )8ð )8ð )8ðX9ð 9ð 9ð 9ðx9ð 9ð 9ð 9ðx9ð 9ð 9ð 9ðx##ð ##ð ##ð ##ð ##ð ##r   