Skip to content

DataExample.py

FUNCTION DESCRIPTION
load_example_data

Load the data example csv file to a DataFrame.

load_example_data

load_example_data()

Load the data example csv file to a DataFrame.

Source code in src/smellscapy/databases/DataExample.py
 8
 9
10
11
12
13
14
15
16
17
def load_example_data() -> pd.DataFrame: 
    """ 
    Load the data example csv file to a DataFrame.
    """

    data_resource = resources.files("smellscapy.data").joinpath("DataExample.csv")
    with resources.as_file(data_resource) as f:
        data = pd.read_csv(f, sep=";")
    logger.info("Loaded data example from Smellscapy's included CSV file.")
    return data