import pandas as pd if __name__ == "__main__": no_observations = 4226 ids = list(range(no_observations)) out_observations = {"observation_id": ids, "class_id": [0] * no_observations} output_df = pd.DataFrame.from_dict(out_observations) output_df.to_csv("submission.csv", index=False)