メインコンテンツへスキップ
すべての W&B Artifacts と同様に、Tables は pandas のデータフレームに変換できるため、データを簡単にエクスポートできます。

tableartifact に変換する

まず、table を Artifacts に変換する必要があります。これを行う最も簡単な方法は、artifact.get(table, "table_name") を使うことです。
# 新しいテーブルを作成してログに記録する。
with wandb.init() as r:
    artifact = wandb.Artifact("my_dataset", type="dataset")
    table = wandb.Table(
        columns=["a", "b", "c"], data=[(i, i * 2, 2**i) for i in range(10)]
    )
    artifact.add(table, "my_table")
    wandb.log_artifact(artifact)

# 作成した Artifacts を使用して、作成済みのテーブルを取得する。
with wandb.init() as r:
    artifact = r.use_artifact("my_dataset:latest")
    table = artifact.get("my_table")

artifact をデータフレームに変換する

次に、そのテーブルをデータフレームに変換します。
# 前のコード例からの続き:
df = table.get_dataframe()

データのエクスポート

これで、データフレーム がサポートしている任意のエクスポート方法を使用してエクスポートできます。
# テーブルデータを .csv に変換する
df.to_csv("example.csv", encoding="utf-8")

次のステップ