import pandas as pd
import numpy as np

# Load the existing dataset
df = pd.read_csv("customers.csv")

# Add purchases (random integers between 5 and 50)
np.random.seed(42)
df['purchases'] = np.random.randint(5, 51, size=len(df))

# Add churn label (yes/no, with 30% yes)
df['churn'] = np.random.choice(['yes', 'no'], size=len(df), p=[0.3, 0.7])

# Save the updated dataset
df.to_csv("customers_churn.csv", index=False)
print("Updated dataset saved as customers_churn.csv")

