Utility Functions#

Top level functions available when you import animal-soup

animal_soup.create_df(path, remove_existing=False)#

Create a new behavior DataFrame

Parameters:
  • path (str or Path) – path to save the new behavior DataFrame as a hdf5 file, should be located under PARENT_DATA_PATH

  • remove_existing (bool) – If True, remove an existing behavior DataFrame file if it exists at the given path, default False

Returns:

New empty behavior DataFrame

Return type:

pd.DataFrame

animal_soup.load_df(path)#

Load the behavior dataframe hdf5 file

Parameters:

path (str or Path) –

Returns:

behavior dataframe loaded from the specified path

Return type:

pd.DataFrame

animal_soup.set_parent_raw_data_path(path)#

Set the global PARENT_DATA_PATH

Parameters:

path (Path or str) – Full parent data path

Return type:

Path

animal_soup.get_parent_raw_data_path()#

Get the global PARENT_DATA_PATH

Returns:

global PARENT_DATA_PATH as a Path object

Return type:

Path