I have the following code where file[f] has 3 directory of files. I am trying to create a dictionary made of dictionaries made of arrays. Everything seems to go fine until I try adding the SHEETS dictionary to the FILE dictionary which is where for some reason all the values in the dictionary FILE get replaced.
SHEETS = {}
FILE = {}
f = 0
while f < len(file):
s = 2 #specifies which sheet to start at
p = 7 #specifies how many how sheets to read
while s < p:
df = pd.read_excel(file[f], sheet_name = s)
Z = df.iloc[10:14,4:7].to_numpy()
SHEETS[s-2] = Z
s = s + 1
FILE[f]= SHEETS
f = f + 1