swmmio icon indicating copy to clipboard operation
swmmio copied to clipboard

Added node inflow report into nodes dataframe

Open mehmetbercan opened this issue 6 years ago • 1 comments

mehmetbercan avatar Sep 02 '19 06:09 mehmetbercan

Thanks for this contribution, @mehmetbercan! The reason the checks are failing is a because the new column headers introduced by the "Node Inflow Summary" section of the RPT file conflict with column headers already brought into the nodes dataframe by default. This results in this error a failed test_model_to_networkx unit test. Here's the main error message:

ValueError: columns overlap but no suffix specified: Index(['MaxLatInflow', 'MaxTotalInflow', 'LatInflowV', 'TotalInflowV', 'FlowBalErrorPerc']

I think we need to consider a couple things to resolve this:

  1. we should be consistent with what columns are called
  2. we should potentially let users define what columns should be return when calling model.nodes(), similar to #36
  3. an easy fix would be to specific a left/right suffix to Pandas when attempting to join dataframes with non-unique columns names

aerispaha avatar Sep 09 '19 13:09 aerispaha