It seems more like a Pandas related question, so probably StackOverflow would be a better place to ask, as there are probably more Pandas users.
However, as far as I understood the question, this should work:
num_samples = 10
num_classes = 9
df = pd.DataFrame(index=range(num_samples), columns=[str(x) for x in range(num_classes)])
for i in range(num_samples):
    df.iloc[i] = torch.randn(1, num_classes).numpy().round(2)