§
    Ҭ¸jæ  ã                  ó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
        * If set to `True` (default), null values are ignored. If there
          are no non-null values, the output is `True`.
        * 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     úu/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/polars/functions/aggregation/vertical.pyr   r      s8   € ðp ð ÝŒu�S‰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
        * If set to `True` (default), null values are ignored. If there
          are no non-null values, the output is `False`.
        * 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.

    Notes
    -----
    If there are no non-null values, then the output is `0`.
    If you would prefer empty sums to return `None`, you can
    use `pl.when(pl.col(name).count()>0).then(pl.sum(name))` instead
    of `pl.sum(name)`.

    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   í   s   € õ@ Œ5�%ˆ=×ÒÑÔÐ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    0  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@ð @ð @ð @ðF##ð ##ð ##ð ##ð ##ð ##r   