I have a folder with about 100 csv files. I want to use a two sampled Kolmogorov-Smirnov test on every possible file combination. I can do this manually like this:
import pandas as pd
import scipy as sp
df=pd.read_csv(r'file1.csv')
df2=pd.read_csv(r'file2.csv')
sp.stats.ks_2samp(df, df2)
but I don't want to manually assign all the variables. Is there a way to iterate through the files and compare all the possible combinations using the statistical test?