Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apis/python/src/tiledbsoma/_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ def obs_axis_delete(

Note: Deleting observations does not change the size of the current domain or possible enumeration values.

.. warning::

After deleting observations, :func:`~tiledbsoma.io.update_obs` cannot
cannot be used to update the remaining ``obs`` data. Deletion creates gaps in
``soma_joinid`` values that ``update_obs`` does not currently handle.
Use :meth:`DataFrame.write` directly as a workaround.

Args:
coords:
A per-dimension ``Sequence`` of scalar, slice, sequence of scalar or
Expand Down Expand Up @@ -233,6 +240,13 @@ def var_axis_delete(

Note: Deleting variables does not change the size of the current domain or possible enumeration values.

.. warning::

After deleting variables, :func:`~tiledbsoma.io.update_var` cannot
be used to update the remaining ``var`` data. Deletion creates gaps in
``soma_joinid`` values that ``update_var`` does not currently handle.
Use :meth:`DataFrame.write` directly as a workaround.

Args:
coords:
A per-dimension ``Sequence`` of scalar, slice, sequence of scalar or
Expand Down
14 changes: 14 additions & 0 deletions apis/python/src/tiledbsoma/io/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,13 @@ def update_obs(
2. Modify values / add or drop columns while preserving row order.
3. Pass the modified DataFrame as ``new_data``.

.. warning::

Currently this function does not work on Experiments that have had
observations deleted via :func:`obs_axis_delete`. Deletion creates gaps
in ``soma_joinid`` values, which causes an internal validation check to
fail. As a workaround, use :meth:`DataFrame.write` directly.

Args:
exp: :class:`Experiment` opened for write.
new_data: A :class:`pandas.DataFrame` containing the final desired data for the existing ``obs`` DataFrame.
Expand Down Expand Up @@ -1450,6 +1457,13 @@ def update_var(

Analogous to ``update_obs``, but replaces the ``var`` DataFrame within a specific :class:`Measurement`. See :func:`update_obs` for details.

.. warning::

This function does not work on Experiments that have had variables
deleted via :func:`var_axis_delete`. Deletion creates gaps in
``soma_joinid`` values, which causes an internal validation check to
fail. As a workaround, use :meth:`DataFrame.write` directly.

Args:
exp: :class:`Experiment` opened for write.
new_data: A ``pandas.DataFrame`` containing the final desired data for the ``Measurement``'s ``var``.
Expand Down
Loading