reVReports.characterizations.validate_characterization_remapper#

validate_characterization_remapper(characterization_remapper, supply_curve_df)[source]#

Ensure the validity of the input characterization map

Intended for use as a helper function to unpack_characterizations().

Parameters:
  • characterization_remapper (dict) – This dictionary defines how to unpack and recast values from the characterization JSON strings to new columns. See documentation of unpack_characterizations() for details.

  • supply_curve_df (list) – DataFrame that will be used with characterization_remapper.

Raises:
  • KeyError – A KeyError will be raised if any of the input column names in characterization_remapper are not present in supply_curve_df.

  • ValueError – A ValueError will be raised if any invalid combinations of parameters are encountered in characterization_remapper.