wandb.Table
to log data to visualize and query with W&B. In this guide, learn how to:wandb.Table
constructor in one of two ways:wandb.Table(columns=["a", "b", "c"], data=[["1a", "1b", "1c"], ["2a", "2b", "2c"]])
generates a table with two rows and three columns.wandb.Table(dataframe=my_df)
. Column names will be extracted from the DataFrame.table.add_data("3a", "3b", "3c")
. Note that the new row is not represented as a list. If your row is in list format, use star notation to expand the list to positional arguments: table.add_data(*my_row_list)
. The row must contain the same number of entries as there are columns in the table.table.add_column(name="col_name", data=col_data)
. Note that the length of col_data
must be equal to the table's current number of rows. Here, col_data
can be a list data, or a Numpy NDArray.for ndx, row in table.iterrows(): ...
to efficiently iterate over the data's rows.table.get_column("col_name")
. As a convenience, users can pass convert_to="numpy"
to convert the column to a Numpy NDArray of primitives. This is useful if your column contains media types such as wandb.Image so that you can access the underlying data directly.wandb.log()
to save your table to the run, like so:wandb.Table.MAX_ROWS = X
artifact.add()
to log tables to the Artifacts section of your run instead of the workspace. This could be useful if you have a dataset that you want to log once and then reference for future runs. Refer to this Colab for a detailed example of artifact.add() with image data → and this Report for an example of how to use Artifacts and Tables to version control and deduplicate tabular data →.wandb.JoinedTable(table_1, table_2, join_key)
.wandb.Table
, ArtifactEntry) the path to a wandb.Table
in an artifact, the table object, or ArtifactEntrywandb.Table
, ArtifactEntry) the path to a wandb.Table
in an artifact, the table object, or ArtifactEntry