Skip to main content

Class wandb.Table

method Table.add_column()

Adds a column of data to the table.
Arguments
str
The unique name of the column.
list[Any] | np.ndarray
A column of homogeneous data.
bool
If null-like values are permitted.

method Table.add_computed_columns()

Adds one or more computed columns based on existing data.
Arguments
Callable[[int, dict[ColumnKey, Any]], dict[str, Any]]
A function which accepts an index and row dict, and returns a dict representing new columns for that row, keyed by the new column names.
Examples
table = wandb.Table(columns=[“x”, “y”], data=[[3, 1], [4, 6]]) table.add_computed_columns( ) In the callback:
  • ndx is an integer representing the index of the row.
  • row is a dictionary keyed by existing columns.

method Table.add_data()

Adds a new row of data to the table. The maximum amount ofrows in a table is determined by wandb.Table.MAX_ARTIFACT_ROWS. The length of the data should match the length of the table column.
Arguments
Any

method Table.add_row()

Deprecated. Use Table.add_data method instead.
Arguments
Any

method Table.cast()

Casts a column to a specific data type. This can be one of the normal python classes, an internal W&B type, or an example object, like an instance of wandb.Image or wandb.Classes.
Arguments
ColumnKey
The name of the column to cast.
Any
The target dtype.
bool
If the column should allow Nones.

method Table.get_column()

Retrieves a column from the table and optionally converts it to a NumPy object.
Arguments
ColumnKey
The name of the column.
Literal['numpy'] | None
“numpy” will convert the underlying data to a NumPy object.

method Table.get_dataframe()

Returns a pandas.DataFrame of the table.

method Table.get_index()

Returns an array of row indexes for use in other tables to create links.