mario.CoreModel.is_balanced

CoreModel.is_balanced(method, data_set='baseline', margin=0.05, as_dataframe=False)

Checks if a specific data_set in the database is balance or not

Note

If the datase is not balance, a table will be printed spotting the inbalances.

Parameters:
  • method (str) –

    represents the method to check the balance:

    1. ’flow’

    2. ’coefficient’: (zeros wont be considered)

    3. ’price’: (zeros wont be considered)

  • data_set (str) – defines the scenario to be checked

  • margin (float) – float which will be considered as a margin for the balance

  • as_dataframe (boolean) – if True, in case that datbase is not balance, will return a pd.DataFrame spotting the imbalances

Returns:

  • if balance – returns True

  • if not balance – if as_dataframe= False, return a boolean (False) if as_dataframe= True, return a pd.DataFrame