Utility Functions#
Top level functions available when you import mesmerize-core
- mesmerize_core.create_batch(path, remove_existing=False)#
Create a new batch DataFrame
- Parameters:
path (str or Path) – path to save the new batch DataFrame as a pickle file
remove_existing (bool) – If
True
, remove an existing batch DataFrame file if it exists at the given path, defaultFalse
- Returns:
New empty batch DataFrame
- Return type:
pd.DataFrame
Examples
from mesmerize_core import * df = create_batch("/path/to/new_batch.pickle")
- mesmerize_core.load_batch(path)#
Load the batch dataframe pickle file
- Parameters:
path (str or Path) –
- Returns:
batch dataframe loaded from the specified path
- Return type:
pd.DataFrame
Examples
from mesmerize_core import * df = load_batch("/path/to/batch.pickle") # view dataframe df.head()
- mesmerize_core.set_parent_raw_data_path(path)#
Set the global PARENT_DATA_PATH
- Parameters:
path (Path or str) – Full parent data path
- Return type:
Path
- mesmerize_core.get_parent_raw_data_path()#
Get the global PARENT_DATA_PATH
- Returns:
global PARENT_DATA_PATH as a Path object
- Return type:
Path