I have list of data frames, a list of 279 elements and each element is made of 10 data frames. So for example List_DATA[0][9] gives me the 9th data frame of the first list. I am trying to create a different list of data "List_Selected" in a loop using the values of "List_DATA":
List_Selected=[]
for i in range(0,279):
List_Selected_temp=[]
for j in range(0,10):
List_Selected_temp.append(List_DATA[i][j][(List_DATA[i][j]['A']>3) & (List_DATA[i][j]['A']<5)])
List_Selected.append(List_Selected_temp)
The problem is in the end I get identical data-frames values for all the 279 lists. So I have a bug somewhere and I cannot find it.I guess the lists are being overwritten, can anyone maybe spot the mistake in my code?
List_Selected.append(List_Selected_temp)so that it is appending infor iinstead of insidefor j