the df is DataFrame and contain
“data”, “label” column
and I want to use DataLoader function to split the data every batch_size
batch_size = 32
test_loader = DataLoader(dataset=df, batch_size = batch_size,
                        shuffle = True, num_workers=2)

for i, data in enumerate(test_loader):
    print(data['data'])

but there is error like below:

~/.local/lib/python3.5/site-packages/torch/utils/data/dataloader.py in next(self)
334                 self.reorder_dict[idx] = batch
335                 continue
–> 336             return self._process_next_batch(batch)
337
338     next = next  # Python 2 compatibility

how can i fix this error?
thank you