pandahandler.tabulation
Univariate data tabulation.
Classes
Counts and associated metadata for a univariate data set. |
Functions
|
Create a tabulation of data. |
Module Contents
- class pandahandler.tabulation.Tabulation[source]
Counts and associated metadata for a univariate data set.
- n_distinct: int[source]
The number of distinct values in the input series (i.e. the number of rows in df).
- __attrs_post_init__() None[source]
Data validation.
- Raises:
ValueError – If counts index is not monotonic increasing, after removing nulls.
- pandahandler.tabulation.tabulate(data: Iterable[Hashable], name: str | None = None, dropna: bool = False) Tabulation[source]
Create a tabulation of data.
- Parameters:
data – The data to tabulate.
name – A name for the data set being tabulated. Defaults to None, but inherits the name of the input data if it has a name attribute.
dropna – Whether to drop NA values before tabulating. Defaults to False.