import pandas as pd from datasets import load_dataset dataset_remote = load_dataset("parquet", data_files={'test': '/tmp/data/data/test-00000-of-00001.parquet'}) out = [] for id in dataset_remote["test"]["id"]: out.append(dict(id = id, pred = "flux")) pd.DataFrame(out).to_csv("submission.csv",index = False)