allensdk.brain_observatory.vbn_2022.metadata_writer.dataframe_manipulations module

allensdk.brain_observatory.vbn_2022.metadata_writer.dataframe_manipulations.strip_substructure_acronym_df(df: DataFrame, col_name: str) DataFrame[source]

Take the structure_acronym(s) column of a dataframe and remove the substructure (i.e. convert DG-mo to DG).

Return the altered dataframe.

Parameters:
df: pd.DataFrame
col_name: str

The name of the structure_acronym column. Note: if the column is a list of strings (as in the probes.csv table) every element in the list will be sanitized.