So I have this google sheets file, I need to extract event data and create Event Model in Django. So far I have no problem getting data from API, but some of the fields in spreadsheets are empty, thus, API does not return me those fields, for example, index 23 is complete, but in index 24 fields are not defined. It is ok for me to enter empty data in Django models, it does not matter at all.
WHAT I ACTUALLY WANT is if array[22][1]
is empty(which it is (array[22][0] is 'May 4')) then append null value for that index. I wrote this line but it doesn't work, how do I implement this?
for row in range(index):
for column in range(6):
try:
print(values[row][column])
except IndexError:
values[row][column].append('')