Skip to content

Commit

Permalink
Ensured all numeric columns in condition_df
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Sahlberg authored and Andreas Sahlberg committed Jan 5, 2022
1 parent 633e699 commit 873bf34
Show file tree
Hide file tree
Showing 3 changed files with 2,951 additions and 2,950 deletions.
5 changes: 3 additions & 2 deletions onsset/onsset.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
SET_MIN_CATEGORY = 'MinimumCategory' # The category with minimum lcoe (grid, minigrid or standalone)
SET_NEW_CAPACITY = 'NewCapacity' # Capacity in kW
SET_INVESTMENT_COST = 'InvestmentCost' # The investment cost in USD
SET_CONFLICT = "Conflict"
SET_ELEC_ORDER = "ElectrificationOrder"
SET_LIMIT = "ElecStatusIn"
SET_MIN_OFFGRID_CODE = "Off_Grid_Code"
Expand Down Expand Up @@ -746,7 +745,9 @@ def condition_df(self):
SET_ELEVATION, SET_SLOPE, SET_LAND_COVER, SET_SUBSTATION_DIST, SET_HV_DIST_CURRENT,
SET_HV_DIST_PLANNED, SET_MV_DIST_CURRENT, SET_MV_DIST_PLANNED, SET_ROAD_DIST, SET_X_DEG, SET_Y_DEG,
SET_DIST_TO_TRANS, SET_HYDRO_DIST, SET_HYDRO, SET_HYDRO_FID, SET_URBAN, SET_CAPITA_DEMAND,
SET_AGRI_DEMAND, SET_HEALTH_DEMAND, SET_EDU_DEMAND, SET_COMMERCIAL_DEMAND, SET_ELEC_ORDER]
SET_AGRI_DEMAND, SET_HEALTH_DEMAND, SET_EDU_DEMAND, SET_COMMERCIAL_DEMAND, SET_ELEC_ORDER,
'ResidentialDemandTierCustom', 'ResidentialDemandTier1', 'ResidentialDemandTier2',
'ResidentialDemandTier3', 'ResidentialDemandTier4', 'ResidentialDemandTier5']

for column in columns:
self.df[column] = pd.to_numeric(self.df[column], errors='coerce')
Expand Down
Loading

0 comments on commit 873bf34

Please sign in to comment.