Rezone.rezone_od#

classmethod Rezone.rezone_od(df, lookup, df_cols=('origin', 'destination'), **kwargs)[source]#

Rezones the matrix on both the origin and destination columns.

Uses the rezone method.

Parameters:
  • df (pandas.DataFrame) – The matrix to be rezoned.

  • lookup (pandas.DataFrame) – The lookup tables to do the rezoning.

  • dfCols (iterable) – The columns to be replaced with a new zone system.

  • kwargs (keyword arguments) – Any keyword arguments to pass to Rezone.rezone.

Returns:

df – The original dataframe with the columns rezoned.

Return type:

pandas.DataFrame