> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Explore how to use W&B Tables with this 5 minute Quickstart.

# Tutorial: Log tables, visualize and query data

The following Quickstart demonstrates how to log data tables, visualize data, and query data.

Select the button below to try a PyTorch Quickstart example project on MNIST data.

[Try in Colab](https://colab.research.google.com/github/wandb/examples/blob/master/colabs/datasets-predictions/W%26B_Tables_Quickstart.ipynb)

## 1. Log a table

Log a table with Weights & Biases. You can either construct a new table or pass a Pandas Dataframe.

> [tab] Construct a table
>
> To construct and log a new Table, you will use:
>
> * [`wandb.init()`](https://docs.coreweave.com/products/wandb/ref/python/functions/init): Create a [run](https://docs.coreweave.com/products/wandb/runs.md) to track results.
> * [`wandb.Table()`](https://docs.coreweave.com/products/wandb/ref/python/data-types/table): Create a new table object.
>   * `columns`: Set the column names.
>   * `data`: Set the contents of each row.
> * [`wandb.Run.log()`](https://docs.coreweave.com/products/wandb/ref/python/experiments/run#method-runlog): Log the table to save it to Weights & Biases.
>
> Here's an example:
>
> ```python theme={"system"}
> import wandb
>
> with wandb.init(project="table-test") as run:
>     # Create and log a new table.
>     my_table = wandb.Table(columns=["a", "b"], data=[["a1", "b1"], ["a2", "b2"]])
>     run.log({"Table Name": my_table})
> ```

> [tab] Pandas Dataframe
>
> Pass a Pandas Dataframe to `wandb.Table()` to create a new table.
>
> ```python theme={"system"}
> import wandb
> import pandas as pd
>
> df = pd.read_csv("my_data.csv")
>
> with wandb.init(project="df-table") as run:
>     # Create a new table from the DataFrame
>     # and log it to W&B.
>   my_table = wandb.Table(dataframe=df)
>   run.log({"Table Name": my_table})
> ```
>
> For more information on supported data types, see the [`wandb.Table`](https://docs.coreweave.com/products/wandb/ref/python/data-types/table) in the W\&B API Reference Guide.

## 2. Visualize tables in your project workspace

View the resulting table in your workspace.

1. Navigate to your project in the W\&B App.
2. Select the name of your run in your project workspace. A new panel is added for each unique table key.

![Sample table logged](https://mintcdn.com/coreweave-dbfa0e8d/3Dv_sw2eg8feUJlx/products/wandb/_media/wandb_demo_logged_sample_table.png?fit=max\&auto=format\&n=3Dv_sw2eg8feUJlx\&q=85\&s=e142442acbbd1cac6b537a4cd1db98f0)

In this example, `my_table`, is logged under the key `"Table Name"`.

## 3. Compare across model versions

Log sample tables from multiple W\&B Runs and compare results in the project workspace. In this [example workspace](https://wandb.ai/carey/table-test?workspace=user-carey), we show how to combine rows from multiple different versions in the same table.

![Cross-run table comparison](https://mintcdn.com/coreweave-dbfa0e8d/3Dv_sw2eg8feUJlx/products/wandb/_media/wandb_demo_toggle_on_and_off_cross_run_comparisons_in_tables.gif?s=4b25508ce2fcec2a32a7322c379b8a80)

Use the table filter, sort, and grouping features to explore and evaluate model results.

![Table filtering](https://mintcdn.com/coreweave-dbfa0e8d/3Dv_sw2eg8feUJlx/products/wandb/_media/wandb_demo_filter_on_a_table.png?fit=max\&auto=format\&n=3Dv_sw2eg8feUJlx\&q=85\&s=c396a971337201355dae83529deca972)
