stilt.Project.add_table#

Project.add_table(name, table)[source]#

Add rows to one of the project’s input tables, and return its path.

A table is an input, like receptors.csv: the averaging kernels of satellite soundings, for one, which a transform names as table: kernels. It is kept as tables/<name>.parquet, created if needed and otherwise added to. When the table has a receptor column, rows of a receptor it already holds are left out, so adding the same kernels again changes nothing.

Parameters:
  • name (str) – The table’s name: letters, digits, _, and -.

  • table (DataFrame) – Rows to add, in the columns of the table.

Raises:

ValueError – If table has other columns than the table it adds to.

Return type:

Path

Examples

>>> receptors, kernels = receptors_from_soundings(
...     df, "slant", top=3000
... )
>>> project.add_receptors(receptors)
>>> project.add_table("kernels", kernels)