Utilities
rerun.utilities
datafusion
DataFusion utilities.
collect
def collect_to_string_list(df, col, remove_nulls=True)
Collect a single column of a DataFrame into a Python string list.
This is a convenience function. DataFusion collection returns a stream of record batches. Sometimes it is preferable to extract a single column out of all of these batches and convert it to a string.
| PARAMETER | DESCRIPTION |
|---|---|
df
|
The input DataFusion DataFrame
TYPE:
|
col
|
The column to collect. You can provide either a string column name or a DataFusion expression. |
remove_nulls
|
If true, any
TYPE:
|
functions
url_generation
def segment_url(dataset, *, segment_id=None, timestamp=None, timeline_name=None, time_range_start=None, time_range_end=None, selection=None)
Compute the URL for a segment within a dataset.
This is a Rerun focused DataFusion function that will create a DataFusion expression for the segment URL.
| PARAMETER | DESCRIPTION |
|---|---|
dataset
|
The input Rerun Dataset.
TYPE:
|
segment_id
|
Expression or column name for the segment ID. If not provided, the column named |
timestamp
|
Expression or column name for a timestamp. Generate a URL that specifies the position of the time cursor when opened by the viewer. |
timeline_name
|
Specifies which timeline to use when used in combination with
TYPE:
|
time_range_start
|
Expression or column name for the start of a time range selection. Must be used together with |
time_range_end
|
Expression or column name for the end of a time range selection. Must be used together with |
selection
|
Expression or column name for the data path to select. The syntax is an entity path, optionally
followed by an instance index and/or component name (e.g. |