CostDistribution.from_file#
- static CostDistribution.from_file(filepath, *, min_col='min', max_col='max', avg_col='avg', trips_col='trips', weighted_avg_col=None)[source]#
Build an instance from a file on disk.
- Parameters:
filepath (PathLike) – Path to the file to read in.
min_col (str) – The column of data at filepath that contains the minimum cost value of each band.
max_col (str) – The column of data at filepath that contains the maximum cost value of each band.
avg_col (str) – The column of data at filepath that contains the average cost value of each band.
trips_col (str) – The column of data at filepath that contains the number of trips of each cost band.
weighted_avg_col (str | None) – The column of data at ‘filepath’ that contains the weighted average cost value of each band. If the read in df does not contain this column, it will default to the avg_col.
- Returns:
An instance containing the data at filepath.
- Return type:
cost_distribution