msmu.dt.drop
Delete a metadata entry or table column in place, recording its location for replay.
target is uns, obsm, varm, a modality-specific equivalent,
or a table path accepted by map. A mapping target deletes
its key; a table target deletes a column, so <modality>.decoy removes
a decoy-table column while <modality>.uns with key="decoy" removes the
whole table. Missing keys raise KeyError.
Returns the same MuData; provenance and global modality masks cannot be deleted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
|
required |
target
|
str
|
Metadata mapping or table path. |
required |
key
|
str
|
Entry or column to delete. Missing keys raise |
required |
Returns:
| Type | Description |
|---|---|
MuData
|
The same |
Examples:
import msmu as mm
mdata.uns["temporary_note"] = "reviewed"
mm.dt.drop(mdata, target="uns", key="temporary_note")