modelhub.Map.pre_conversion_hit_number
pre_conversion_hit_number
(data, name, partition='session_id')Returns a count backwards from the first conversion, given the partition. I.e. first hit before converting is 1, second hit before converting 2, etc. Returns None if there are no conversions in the partition or after the first conversion.
Parameters
data
(bach.dataframe.DataFrame) –bach.DataFrame
to apply the method on.name
(str) – the name of the conversion to label as set inModelHub.conversion_events
.partition
(str) – the partition over which the number of conversions are counted. Can be any column indata
.
Returns
bach.SeriesInt64
with the same index as data
.