class_docstr: Utility class for performing a group by operation over a lazy DataFrame.
  
  Generated by calling `df.lazy().group_by(...)`.
class_docstr_tok: ["Utility","class","for","performing","a","group","by","operation","over","a","lazy","DataFrame",".","Generated","by","calling","`","df.lazy","(",")",".group_by","(","...",")","`","."]
docstr: Count the unique values per group.
  
  Examples
  --------
  >>> ldf = pl.DataFrame(
  ...     {
  ...         "a": [1, 2, 1, 3, 4, 5],
  ...         "b": [0.5, 0.5, 0.5, 10, 13, 14],
  ...         "d": ["Apple", "Banana", "Apple", "Apple", "Banana", "Banana"],
  ...     }
  ... ).lazy()
  >>> ldf.group_by("d", maintain_order=True).n_unique().collect()
  shape: (2, 3)
  ┌────────┬─────┬─────┐
  │ d      ┆ a   ┆ b   │
  │ ---    ┆ --- ┆ --- │
  │ str    ┆ u32 ┆ u32 │
  ╞════════╪═════╪═════╡
  │ Apple  ┆ 2   ┆ 2   │
  │ Banana ┆ 3   ┆ 3   │
  └────────┴─────┴─────┘
docstr_tok: ["Count","the","unique","values","per","group",".","Examples","--","--","--","--",">",">",">","ldf","=","pl.DataFrame","(","...","{","...","``","a","''",":","[","1",",","2",",","1",",","3",",","4",",","5","]",",","...","``","b","''",":","[","0.5",",","0.5",",","0.5",",","10",",","13",",","14","]",",","...","``","d","''",":","[","``","Apple","''",",","``","Banana","''",",","``","Apple","''",",","``","Apple","''",",","``","Banana","''",",","``","Banana","''","]",",","...","}","...",")",".lazy","(",")",">",">",">","ldf.group_by","(","``","d","''",",","maintain_order=True",")",".n_unique","(",")",".collect","(",")","shape",":","(","2",",","3",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","d","\u2506","a","\u2506","b","\u2502","\u2502","--","-","\u2506","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","u32","\u2506","u32","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","Apple","\u2506","2","\u2506","2","\u2502","\u2502","Banana","\u2506","3","\u2506","3","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518"]
code: def n_unique(self) -> LazyFrame:
      """
      Count the unique values per group.
  
      Examples
      --------
      >>> ldf = pl.DataFrame(
      ...     {
      ...         "a": [1, 2, 1, 3, 4, 5],
      ...         "b": [0.5, 0.5, 0.5, 10, 13, 14],
      ...         "d": ["Apple", "Banana", "Apple", "Apple", "Banana", "Banana"],
      ...     }
      ... ).lazy()
      >>> ldf.group_by("d", maintain_order=True).n_unique().collect()
      shape: (2, 3)
      ┌────────┬─────┬─────┐
      │ d      ┆ a   ┆ b   │
      │ ---    ┆ --- ┆ --- │
      │ str    ┆ u32 ┆ u32 │
      ╞════════╪═════╪═════╡
      │ Apple  ┆ 2   ┆ 2   │
      │ Banana ┆ 3   ┆ 3   │
      └────────┴─────┴─────┘
  
      """
      return self.agg(F.all().n_unique())
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Callable, Iterable
  from polars import functions
  from polars.utils._parse_expr_input import parse_as_list_of_expressions
  from polars.utils._wrap import wrap_ldf
  from polars.utils.deprecation import deprecate_renamed_function
label_desc: Use image node_id 14 for calling the LazyGroupBy obj's underlying member method code with example usage: obj.n_unique() and returns: self