# modelhub.FunnelDiscovery.get_navigation_paths

### get_navigation_pathsβ

(data, steps, by=NotSet.token, location_stack=None, add_conversion_step_column=False, only_converted_paths=False, start_from_end=False, n_examples=None, sort_by=None)β[source]

Get the navigation paths for each eventβs location stack. Each navigation path is represented as a row, where each step is defined by the nice name of the considered location.

For each location stack:

The number of navigation paths to be generated is less than or equal to

`steps`

.The locations to be considered as starting steps are those that have an offset between 0 and

`steps - 1`

in the location stack.For each path, the rest of steps are defined by the

`steps - 1`

locations that follow the start location in the location stack.

For example, having `location_stack = [βaβ, βbβ, βcβ , βdβ]`

and `steps`

= 3
will generate the following paths:

`βaβ, βbβ, βcβ`

`βbβ, βcβ, βdβ`

`βcβ, βdβ, None`

#### Parametersβ

(bach.dataframe.DataFrame) β`data`

`bach.DataFrame`

to apply the method on.(int) β Number of steps/locations to consider in navigation path.`steps`

(Union[List[Union[str, bach.series.series.Series]], str, bach.series.series.Series, sql_models.constants.NotSet]) β sets the column(s) to group by. If by is None or not set, then steps are based on the order of events based on the entire dataset.`by`

(Union[str, SeriesString, SeriesLocationStack, SeriesInt64]) β the column of which to create the paths. Can be a string of the name of the column in data, or a Series with the same base node as`location_stack`

`data`

. If None the default location stack is taken.(bool) β if True gets the first conversion step number per each navigation path and adds it as a column to the returned dataframe.`add_conversion_step_column`

(bool) β if True filters each navigation path to first conversion location.`only_converted_paths`

(bool) β if True starts the construction of navigation paths from the last context from the stack, otherwise it starts from the first. If there are too many steps, and we limit the amount with`start_from_end`

`n_examples`

parameter we can lose the last steps of the user, hence in order to βprioritizeβ the last steps one can use this parameter. Having`location_stack = [βaβ, βbβ, βcβ , βdβ]`

and`steps`

= 3 will generate the following paths:`βbβ, βcβ, βdβ`

`βaβ, βbβ, βcβ`

`None, βaβ, βbβ`

(int) β limit the amount of navigation paths. If`n_examples`

`None`

, all the navigation paths are taken.(str) β column to sort by for determining the order of the sequences of βlocation_stackβ`sort_by`

#### Returnsβ

Bach DataFrame containing a new Series for each step containing the nice name of the location.