idmd.data.exporter.DataExporter

class idmd.data.exporter.DataExporter[source]

Bases: object

Handles data export functionality.

Methods

export_to_csv

Converts a DataFrame to a CSV string.

validate_data

Validates if the dataset exists in the session state.

static export_to_csv(df)[source]

Converts a DataFrame to a CSV string.

Return type:

str

Args:

df (pd.DataFrame): The DataFrame to export.

Returns:

str: The CSV string representation of the DataFrame.

static validate_data(session_state)[source]

Validates if the dataset exists in the session state.

Return type:

bool

Args:

session_state (dict): The session state to check.

Returns:

bool: True if the dataset exists, False otherwise.