nuctransportdb.dataframe2yaml

Classes

List_flow_sequence

Built-in mutable sequence.

Functions

flow_sequence_representer(dumper, data)

convert_to_flow_sequence(unit_base)

Convert unit_base to a flow sequence representation.

dataframe2yaml_str(property_df)

Convert the property dataframe to a YAML string.

export2yaml(→ None)

Export the property dataframe to a YAML file.

Module Contents

class nuctransportdb.dataframe2yaml.List_flow_sequence[source]

Bases: list

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

nuctransportdb.dataframe2yaml.flow_sequence_representer(dumper, data)[source]
nuctransportdb.dataframe2yaml.convert_to_flow_sequence(unit_base)[source]

Convert unit_base to a flow sequence representation.

Parameters:

unit_base (list or nonetype) – The unit_base to convert.

Returns:

The flow sequence representation of the unit base.

Return type:

List_flow_sequence

nuctransportdb.dataframe2yaml.dataframe2yaml_str(property_df)[source]

Convert the property dataframe to a YAML string.

Parameters:

property_df (pd.DataFrame) – The input property dataframe.

Returns:

The YAML string representation of the property dataframe.

Return type:

str

nuctransportdb.dataframe2yaml.export2yaml(property_df, output_file_path) None[source]

Export the property dataframe to a YAML file.

Parameters:
  • property_df (pd.DataFrame) – The input property dataframe.

  • output_file_path (str) – Path to the output YAML file.