foxes.output.results_writer.ResultsWriter¶
- class foxes.output.results_writer.ResultsWriter[source]¶
Bases:
Output
Writes results farm data to file.
- Parameters:
farm_results (xarray.Dataset, optional) – The farm results, if data is None
data (pandas.DataFrame, optional) – The data, if farm_results is None
- data¶
The farm results
- Type:
pandas.DataFrame
Methods
__init__
([farm_results, data])new
(model_type, **kwargs)Run-time output model factory.
Prints all model names.
write
(file_path, data[, format_col2var, ...])Writes data to file via pandas.
write_csv
(file_path[, variables, ...])Writes a csv file
- classmethod new(model_type, **kwargs)¶
Run-time output model factory.
- Parameters:
model_type (string) – The selected derived class name
- classmethod print_models()¶
Prints all model names.
- classmethod write(file_path, data, format_col2var={}, format_dict={}, **kwargs)¶
Writes data to file via pandas.
The kwargs are forwarded to the underlying pandas writing function.
- Parameters:
- write_csv(file_path, variables=None, turbine_names=False, verbosity=1, **kwargs)[source]¶
Writes a csv file
- Parameters:
file_path (str) – Path the the csv file
variables (dict or list of str, optional) – The variables to be written. If a dict, then the keys are the foxes variables and the values the column names. If None, then all data will be written.
turbine_names (bool) – Use turbine names instead of turbine indices
verbosity (int) – The verbosity level, 0 = silent
kwargs (dict, optional) – Additional parameters for Output.write()