Skip to content

Commit

Permalink
Update to issue #48, apparently dtype isn't ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Zorn committed Mar 15, 2017
1 parent 8a4f364 commit d8278b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fasttrips/Assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ def read_configuration(override_input_network_dir=None, override_input_demand_di
sys.exit(2)

if PathSet.WEIGHTS_FIXED_WIDTH:
PathSet.WEIGHTS_DF = pandas.read_fwf(weights_file, dtype={PathSet.WEIGHTS_COLUMN_PURPOSE:object})
PathSet.WEIGHTS_DF = pandas.read_fwf(weights_file)
PathSet.WEIGHTS_DF[PathSet.WEIGHTS_COLUMN_PURPOSE] = PathSet.WEIGHTS_DF[PathSet.WEIGHTS_COLUMN_PURPOSE].astype(str)
else:
PathSet.WEIGHTS_DF = pandas.read_csv(weights_file, dtype={PathSet.WEIGHTS_COLUMN_PURPOSE:object}, skipinitialspace=True)
FastTripsLogger.debug("Weights =\n%s" % str(PathSet.WEIGHTS_DF))
Expand Down

0 comments on commit d8278b9

Please sign in to comment.