rxnDB.data.loader

Classes

RxnDBLoader

Functions

main()

Module Contents

class rxnDB.data.loader.RxnDBLoader[source]
in_dir: pathlib.Path
__post_init__() None[source]
load_all() pandas.DataFrame[source]

Load and concatenate all YAML entries in the directory into a single DataFrame.

load_entry(filepath: pathlib.Path) pandas.DataFrame[source]

Load a single YAML file and convert it into a DataFrame.

static save_as_parquet(df: pandas.DataFrame, filepath: pathlib.Path) None[source]

Save a DataFrame as a compressed Parquet file.

static load_parquet(filepath: pathlib.Path) pandas.DataFrame[source]

Load a DataFrame from a Parquet file.

_read_yml(filepath: pathlib.Path) dict[str, Any][source]

Read and parse a YAML file.

_convert_to_str_list(data: Any) list[str][source]

Ensure that the data is converted to a list of strings

rxnDB.data.loader.main()[source]