I have a code like this,
def myfunction(json_dict):
mylistsize = len((list(json_normalize(json_dict,'data')['title'])))-1
print(mylistsize)
data = [c for c in json_dict['data']][0]#This line when it is 0 or 1 or 2 works for me.
df = pd.DataFrame()
data_paragraphs = data['paragraphs']
But when I change it to include all the elements of my array, to something like this -
data = [c for c in json_dict['data']][0:mylistsize]
It gives me an error on this line - data_paragraphs = data['paragraphs']
Kindly help me with this.