Example 2 explains how to initialize a pandas DataFrame with zero rows, but with predefined column names. For this, we have to use the columns argument within the DataFrame() function as shown below: data_2=pd.
DataFrame( index=test_dataset.samples_frame.id, columns=["proba", "label"] ) test_dataloader = torch.utils.data.DataLoader( test_dataset, shuffle=False, batch_size=self.hparams.get("batch_size", 4), num_workers=self.hparams.get("num_workers", 16)) for batch in tqdm(test_...