join_nested#
- Catalog.join_nested(other: Catalog, left_on: str | None = None, right_on: str | None = None, nested_column_name: str | None = None, output_catalog_name: str | None = None, how: str = 'inner') Catalog[source]#
Perform a spatial join to another catalog by adding the other catalog as a nested column
Joins two catalogs together on a shared column value, merging rows where they match.
The result is added as a nested dataframe column using nested-dask, where the right catalog’s columns are encoded within a column in the resulting dataframe. For more information, view the nested-dask documentation.
The operation only joins data from matching partitions and their margin caches, and does not join rows that have a matching column value but are in separate partitions in the sky. For a more general join, see the merge function.
- Parameters:
- otherCatalog
The right catalog to join to
- left_onstr
The name of the column in the left catalog to join on
- right_onstr
The name of the column in the right catalog to join on
- nested_column_namestr
The name of the nested column in the resulting dataframe storing the joined columns in the right catalog. (Default: name of right catalog)
- output_catalog_namestr
The name of the resulting catalog to be stored in metadata
- howstr, {‘inner’, ‘left’}, default ‘inner’
How to handle the alignment
- Returns:
- Catalog
A new catalog with the columns from each of the input catalogs with their respective suffixes added, and the rows merged on the specified columns.