As the title indicates, is there a way to bulk_create list of lists. Like right now I bulk_create it like -
for i in range(len(x))
arr1 = []
for m in range(len(y)):
arr1.append(DataModel(foundation=foundation, date=dates[m], price=price[m]))
DataModel.objects.bulk_create(arr1)
Now this will bulk create till the length of x.
Can it be done like so -
arr = []
for i in range(len(x))
arr1 = []
for m in range(len(y)):
arr1.append(DataModel(foundation=foundation, date=dates[m], price=price[m]))
arr.append(arr1)
DataModel.objects.bulk_create(arr)
If not, what else can be done to store data faster?