import pandas as pd

# Path to the data after removing boolean variables
data_path = "/Users/home/Documents/naz/research_codes/uncert_prop/realworld_exp/hai_down1/train_no_bool.csv"

# Read the cleaned data
df = pd.read_csv(data_path)

# Remove all columns that start with 'P4_'
cols_to_keep = [col for col in df.columns if not col.startswith('P4_')]
df_no_p4 = df[cols_to_keep]

# Save the result
output_path = "/Users/home/Documents/naz/research_codes/uncert_prop/realworld_exp/hai_down1/train_no_bool_no_p4.csv"
df_no_p4.to_csv(output_path, index=False)

print(f"Removed all 'P4_' columns. Saved cleaned data to {output_path}")