APIs
load_data

load_data Function

Summary:

The load_data function is used to load data based on a specified type (SQL or file) and return it as a pandas.DataFrame. The function can either read the referenced data through a RefResponse object or directly accept parameters to specify the data. See the section on ref functions for more information on RefResponse objects.

Parameters:

  • type (str): type of data to be read ("sql" or "sheet").
  • Other configuration parameters.

Response:

  • pandas.DataFrame: the data to be read.

Usage example:

from morphdb_utils.api import load_data
 
data = {
    "sample": load_data({"type": "sql", "sql": "select 1;"}),
}
 
def main(data: Dict[str, pd.DataFrame]):
    # write your code here
    return data["sample"]

Load Data