import pandas as pd df=pd.read_parquet("./ecfp_and_properties/all_data_merged-cleaned-ecfp4-properties-sorted-columns-expanded-ecfp.parquet") ID_col = df.keys()[1] chemical_values= df.keys()[3:11] thermo_values = df.columns[11:26] ecfp_cols = df.columns[174:] selected_cols = [ID_col] + list(chemical_values) + list(thermo_values)+ list(ecfp_cols) # slice your DataFrame combined_df = df[selected_cols] combined_df.to_parquet("./ml_input_data/QML9.parquet") #! final_file