PandasDictInputOutput#

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

Bases: object

Abstract class for defining pandas dictionary input/output functionality.

This abstract class defines two functions with the following purposes:

  • to_pandas_dict - export an object to a dict of pandas.DataFrame.

  • from_pandas_dict - load an object from a dict of pandas.DataFrame.

Methods

from_pandas_dict

Read an object from a dict of pandas.DataFrame.

to_pandas_dict

Export an object to a dict of pandas.DataFrame.

abstract classmethod from_pandas_dict(dic, **kwargs)[source]#

Read an object from a dict of pandas.DataFrame.

Parameters:
  • dic (dict) – Python dictionary containing pandas.DataFrame from which to read.

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

Returns:

out – An object read from a dict of pandas.DataFrame.

Return type:

PandasDictInputOutput

abstract to_pandas_dict(**kwargs)[source]#

Export an object to a dict of pandas.DataFrame.

Parameters:

kwargs (dict) – Additional keyword arguments to use for dictating export to a dict of pandas.DataFrame.

Returns:

out – An output dataframe.

Return type:

dict