MDFactoryMDFactory

DataSource

Abstract base class for data sources.

Functions

funcload_data(self)pd.DataFrame

Load data from the data source.

paramself

Returns

pandas.pandas.DataFrame
funcsave_data(self, data, overwrite=False)

Save data to the data source. Accepts single dict, list of dicts, or DataFrame.

paramself
paramdataUnion[Dict[str, Any], List[Dict[str, Any]], pd.DataFrame]
paramoverwritebool
= False

Returns

None
funcquery_data(self, conditions)pd.DataFrame

Query data from the data source based on specified conditions.

paramself
paramconditionsDict[str, Any]

Returns

pandas.pandas.DataFrame
funcupdate_data(self, conditions, updates)

Update existing data in the data source based on specified conditions.

paramself
paramconditionsDict[str, Any]
paramupdatesT

Returns

None
funcdelete_data(self, conditions)

Delete data from the data source based on specified conditions.

paramself
paramconditionsDict[str, Any]

Returns

None
funcgrab_column(self, column_name)pd.Series

Retrieve a specific column from the data source.

paramself
paramcolumn_namestr

Returns

pandas.pandas.Series
funcgrab_row(self, index)pd.Series

Retrieve a specific row from the data source.

paramself
paramindexint

Returns

pandas.pandas.Series
func_normalize_input(data)pd.DataFrame | None

Convert dict, list of dicts, or DataFrame to a DataFrame.

paramdatadict, list of dict, or pd.DataFrame

Input data in any supported format

Returns

pd.DataFrame | None

Normalized DataFrame, or None when the input is empty

On this page