DatabaseManager
Database management
Class which represents all common features in DMT that are used to search, organize and filter data. Features:
Can read all relevant file formats produced by simulators used at CEDIC.
Uses pandas to manage the data internally.
Allows to “search” and “filter” existing data.
- class DMT.core.database_manager.DatabaseManager(*args, **kwargs)[source]
Bases:
object
Class responsible for data management in DMT.
Methods
load_db(db_dir):
Load a full db from the given path.
save_db(db_dir, data):
Save a full db to the given path.
del_db(db_dir)
Delete the hole database.
save_df(df, file_name):
Save a dataframe as file_name, where file_name is the direct path to the desired file.
load_df(file_name):
Loads a DMT dataframe from the file.
- del_db(db_dir)[source]
Delete the database file for a dut.
- Parameters:
- db_dir
str
oros.Pathlike
Full path to the database.
- db_dir
- load_db(db_dir)[source]
Loads all DMT.DataFrames from the database at db_dir using implicit casting.
- Parameters:
- db_dir
str
oros.Pathlike
Path to the database that shall be used to load df.
- db_dir
- Returns:
- data{key:
DataFrame
} Loaded dataframes
- data{key:
- Raises:
- load_df(file_name: str | PathLike, to_specifier=True)[source]
Load the data stored in file_name, where file_name is the direct path to the file.
- save_db(db_dir, data)[source]
Save the complete data into the database of dut. The old database is overwritten!
- Parameters:
- db_dir
str
oros.Pathlike
Path to the database that shall be used to save the data.
- data{key:
DataFrame
} Dataframes to save
- db_dir
- save_df(df: DataFrame | DataFrame, file_name: str | PathLike, version=2, compression='lz4', **kwargs)[source]
Save the data stored in df as file_name, where file_name is the direct path to the file.
- Parameters:
- df
DMT.core.DataFrame
A dataframe object that shall be saved.
- file_name
str
oros.Pathlike
Direct path to the file
- df