CSVDictInputOutput#

class pybrops.core.io.CSVDictInputOutput.CSVDictInputOutput[source]#

Bases: object

Abstract class for defining CSV input/output functionality.

This abstract class defines two functions with the following purposes:

  • to_csv_dict - write an object to a csv file.

  • from_csv_dict - load an object from a csv file.

Methods

from_csv_dict

Read an object from a set of CSV files specified by values in a dict.

to_csv_dict

Write an object to a set of CSV files specified by values in a dict.

abstract classmethod from_csv_dict(filenames, **kwargs)[source]#

Read an object from a set of CSV files specified by values in a dict.

Parameters:
  • filenames (str) – Dictionary of CSV file names from which to read.

  • kwargs (dict) – Additional keyword arguments to use for dictating importing from a CSV.

Returns:

out – An object read from a set of CSV files.

Return type:

CSVDictInputOutput

abstract to_csv_dict(filenames, **kwargs)[source]#

Write an object to a set of CSV files specified by values in a dict.

Parameters:
  • filenames (dict) – Dictionary of CSV file names to which to write.

  • kwargs (dict) – Additional keyword arguments to use for dictating export to a CSV.

Return type:

None