morpheus.utils.column_info.DistinctIncrementColumn#

class DistinctIncrementColumn(
name,
dtype,
input_name,
groupby_column='username',
period='D',
timestamp_column='timestamp',
)[source]#

Bases: RenameColumn

Subclass of RenameColumn, counts the unique occurrences of a value in groupby_column over a specific time window period based on dates in the timestamp_column field. Only increments the count when the value in input_name changes.

Attributes:
groupby_columnstr

The column to group by.

periodstr

The period to use when grouping.

timestamp_columnstr

The column to use for determining the period.

Methods

convert_pandas_dtype(dtype)

Return the pandas type string of column.

get_input_column_types()

Return a dictionary of input column names and types needed for processing.

get_pandas_dtype()

Return the pandas type string for the currently set dtype.

static convert_pandas_dtype(dtype)[source]#

Return the pandas type string of column.

get_input_column_types()[source]#

Return a dictionary of input column names and types needed for processing. This is used for schema validation and should be overridden by subclasses.

get_pandas_dtype()[source]#

Return the pandas type string for the currently set dtype.