Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docstring about need for include_indicator_columns=True #8528

Merged
merged 1 commit into from
Dec 18, 2024
Merged
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
17 changes: 15 additions & 2 deletions rerun_py/rerun_sdk/rerun/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ def as_arrow_array(self) -> pa.Array:


def send_record_batch(batch: pa.RecordBatch, rec: Optional[RecordingStream] = None) -> None:
"""Coerce a single pyarrow `RecordBatch` to Rerun structure."""
"""
Coerce a single pyarrow `RecordBatch` to Rerun structure.

If this `RecordBatch` came from a call to [`RecordingView.view`][rerun.dataframe.RecordingView.view], you
will want to make sure the `view` call includes `include_indicator_columns = True` or else the
viewer will not know about the archetypes in the data.
"""

indexes = []
data: defaultdict[str, list[Any]] = defaultdict(list)
Expand Down Expand Up @@ -112,7 +118,14 @@ def send_record_batch(batch: pa.RecordBatch, rec: Optional[RecordingStream] = No


def send_dataframe(df: pa.RecordBatchReader | pa.Table, rec: Optional[RecordingStream] = None) -> None:
"""Coerce a pyarrow `RecordBatchReader` or `Table` to Rerun structure."""
"""
Coerce a pyarrow `RecordBatchReader` or `Table` to Rerun structure.

If this `Table` came from a call to [`RecordingView.view`][rerun.dataframe.RecordingView.view], you
will want to make sure the `view` call includes `include_indicator_columns = True` or else the
viewer will not know about the archetypes in the data.

"""
if isinstance(df, pa.Table):
df = df.to_reader()

Expand Down
Loading