ChainRowIterable

class lsst.daf.relation.iteration.ChainRowIterable(chain: collections.abc.Sequence[lsst.daf.relation.iteration._row_iterable.RowIterable])

Bases: lsst.daf.relation.iteration.RowIterable

A RowIterable implementation that wraps itertools.chain.

Parameters:
chain : Sequence [ RowIterable ]

Sequence of iterables to chain together.

Methods Summary

materialized() Convert this iterable to one that holds its rows in a Python collection of some kind, instead of generating them lazily.
sliced(start, stop, None]) Apply a slice operation to this RowIterable.
to_mapping(unique_key) Convert this iterable to a RowMapping, unless it already is one.
to_sequence() Convert this iterable to a RowSequence, unless it already is one.

Methods Documentation

materialized() → lsst.daf.relation.iteration._row_iterable.MaterializedRowIterable

Convert this iterable to one that holds its rows in a Python collection of some kind, instead of generating them lazily.

Returns:
rows : MaterializedRowIterable

A RowIterable that isn’t lazy.

sliced(start: int, stop: int | None[int, None]) → lsst.daf.relation.iteration._row_iterable.RowIterable

Apply a slice operation to this RowIterable.

Parameters:
start : int

Start index.

stop : int or None

Stop index (one-past-the-end), or None to include up through the last row.

Returns:
rows : RowIterable

Iterable representing the slice. May or may not be lazy.

to_mapping(unique_key: collections.abc.Sequence[lsst.daf.relation._columns._tag.ColumnTag]) → lsst.daf.relation.iteration._row_iterable.RowMapping

Convert this iterable to a RowMapping, unless it already is one.

Parameters:
unique_key : Sequence [ ColumnTag ]

Sequence of columns to extract into a tuple to use as keys in the mapping, guaranteeing uniqueness over these columns.

Returns:
rows : RowMapping

A RowIterable backed by a mapping.

to_sequence() → lsst.daf.relation.iteration._row_iterable.RowSequence

Convert this iterable to a RowSequence, unless it already is one.

Returns:
rows : RowSequence

A RowIterable backed by a sequence.