import pandas as pd

df = pd.read_csv("/mnt/hwfile/ai4chem/aizhehong/ChemBOMAS/Tongji_WetExp/v1.0_ChemBOMAS_WetExp_TongJi/train_regression/data4regression/tongji_searchspace/all.csv")
n_split = 4
new_df = [[] for i in range(n_split)]
print(new_df)
for i,row in enumerate(df.iterrows()):
    
    new_df[i%4].append(row[-1])
for i,rows in enumerate(new_df):
    new_df = pd.DataFrame(rows)
    new_df.to_csv(f"split_{i}.csv",index=False)