foxes.output.output.Output

class foxes.output.output.Output[source]

Bases: object

Base class for foxes output.

The job of this class is to provide handy helper functions.

__init__()

Methods

__init__()

new(model_type, **kwargs)

Run-time output model factory.

print_models()

Prints all model names.

write(file_path, data[, format_col2var, ...])

Writes data to file via pandas.

classmethod new(model_type, **kwargs)[source]

Run-time output model factory.

Parameters:

model_type (string) – The selected derived class name

classmethod print_models()[source]

Prints all model names.

classmethod write(file_path, data, format_col2var={}, format_dict={}, **kwargs)[source]

Writes data to file via pandas.

The kwargs are forwarded to the underlying pandas writing function.

Parameters:
  • file_path (string) – The path to the output file

  • data (pandas.DataFrame) – The data

  • format_col2var (dict) – Mapping from column names to flappy variables, for formatting

  • format_dict (dict) – Dictionary with format entries for columns, e.g. {FV.P: ‘{:.4f}’}. Note that the keys are flappy variables