I am trying to iteratively add values to rows and columns through loops. If i increase the number of rolls in this case, loop should add new 1000 values to columns for each specific number of rolls creating new rows each with 1000 columns. However, I am getting the error "ValueError: setting an array element with a sequence."
import random
import pandas as pd
A = [2,6,7]
B = [1,5,9]
C = [3,4,8]
a = pd.DataFrame(); b = pd.DataFrame()
N = 1000
rolls = -1
while rolls != 0:
rolls += 1
for i in range(N):
a.at[rolls,i] = [random.choice(A)]
b.at[rolls,i] = [random.choice(B)]