Skip to main content

Functions

add_labels_to_dataframe

Adds labels to a DataFrame based on provided label information.

convert_json_cbor_to_dataframe

Converts JSON CBOR data to a pandas DataFrame.

convert_sample_to_dataframe

Converts a sample to a DataFrame and adds labels if provided.

fetch_samples

Fetch samples based on the provided parameters and stream them by their IDs.

generate_labels_from_dataframe

Generates structured labels from a DataFrame based on transitions in the specified label column. This function iterates over the rows of a pandas DataFrame and detects changes in the values of a specified label column. It groups consecutive rows with the same label value, and for each group, it returns a dictionary containing the start index, end index, and the label. Optionally, the result can be returned in a dictionary format, compatible with file saving, including the file name.