DataInfo

DataFrameInfo

class Melodie.data_loader.DataFrameInfo(df_name: str, columns: Dict[str, sqlalchemy.types], file_name: str | None = None, engine: str = 'pandas')

Bases: object

DataFrameInfo provides standard format for input tables as parameters.

Parameters:
  • df_name – Name of dataframe.

  • columns – A dict, column name --> column data type.

  • file_name – File name to load this dataframe, None by default. If None, be sure to generate the dataframe in the DataLoader.

  • engine – The library used to load this table file. Valid values are “pandas” and “melodie-table”. However, if DataFrameInfo.FORCE_PANDAS was True, Melodie will use "pandas" to load all dataframes.

df_name

Dataframe name.

columns

Data types for dataframe columns when stored into database.

file_name

Name of dataframe file, now it can be an excel file. Other file types will be implemented later.

If None, it indicates this dataframe will be generated by programming.

MatrixInfo

class Melodie.data_loader.MatrixInfo(mat_name: str, data_type: sqlalchemy.types, file_name: str | None = None)

Bases: object

MatrixInfo provides standard format for input matrices as parameters.

Parameters:
  • mat_name – Name of the current matrix.

  • columns – A type indicating the data type in the matrix.

  • file_name – File name to load this dataframe, None by default. If None, be sure to generate the dataframe in the DataLoader.

mat_name

Name of matrix info

data_type

Data type of matrix elements.

file_name

File that storing this matrix.

If None, it indicates this matrix will be generated by programming.