So I have a dataframe that I want to put each column in a separated list in order to compare them, but I get an index error : list assignment index out of range The code:
for j in range (0, len(df.columns)):
N=[]
N[j]=N.append(df.loc[:,j]
print('list' j, N[j])
How can I avoid this error and get my desired results? Thanks in advance