elphick.geomet.utils.pandas.calculate_recovery

elphick.geomet.utils.pandas.calculate_recovery(df, df_ref, mass_wet='mass_wet', mass_dry='mass_dry')[source]

Calculate recovery of mass-composition for two DataFrames

Parameters:
  • df (DataFrame) – The pd.DataFrame containing mass-composition. H2O if provided will be ignored. All columns other than the mass_wet and mass_dry are assumed to be additive, that is, dry mass weighting is valid. Assumes composition is in %w/w units.

  • df_ref (DataFrame) – The stream that df will be divided by to calculate the recovery. Often the feed stream.

  • mass_wet (str) – The wet mass column, not optional. Consider solve_mass_moisture prior to this call if needed.

  • mass_dry (str) – The dry mass column, not optional. Consider solve_mass_moisture prior to this call if needed.

Return type:

DataFrame

Returns:

A pd.Series containing the total mass and weight averaged composition.