morpheus.utils.column_info.DistinctIncrementColumn
- class DistinctIncrementColumn(name, dtype, input_name, groupby_column='username', period='D', timestamp_column='timestamp')[source]
Bases:
morpheus.utils.column_info.RenameColumn
Subclass of
RenameColumn
, counts the unique occurrences of a value ingroupby_column
over a specific time windowperiod
based on dates in thetimestamp_column
field. Only increments the count when the value ininput_name
changes.- Attributes
- groupby_column
- period
- timestamp_column
The column to group by.
The period to use when grouping.
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
.