modelhub.Aggregate.drop_off_locations
static drop_off_locations
(data, location_stack=None, groupby='user_id', percentage=False)Find the locations/features where users drop off, and their usage/share.
Parameters
data(bach.dataframe.DataFrame) –bach.DataFrameto apply the method on.location_stack(Optional[Union[str, bach.series.series_string.SeriesString, modelhub.series.series_objectiv.SeriesLocationStack, bach.series.series_numeric.SeriesInt64]]) – the column of which to create the drop-off locations. Can be a string of the name of the column in data, or a Series with the same base node asdata. If None the default location stack is taken.- can be any slice of a
modelhub.SeriesLocationStacktype column. - if
None, the whole location stack is taken.
- can be any slice of a
groupby(Union[List[Union[str, bach.series.series.Series]], str, bach.series.series.Series]) – sets the column(s) to group by.percentage– if True calculate the percentage.
Returns
bach.DataFrame with the location where users drop off, and the count/percentage.