nagasurendra commited on
Commit
afec60b
·
verified ·
1 Parent(s): 10e2f81

Update utils/database_handler.py

Browse files
Files changed (1) hide show
  1. utils/database_handler.py +2 -2
utils/database_handler.py CHANGED
@@ -40,8 +40,8 @@ def save_user(name, phone, email, password):
40
  new_user = {"Name": name, "Phone": str(phone), "Email": email, "Password": password}
41
  df = pd.concat([df, pd.DataFrame([new_user])], ignore_index=True)
42
 
43
- # Convert all columns to strings
44
- df = df.astype(str)
45
 
46
  # Save back to Excel
47
  try:
 
40
  new_user = {"Name": name, "Phone": str(phone), "Email": email, "Password": password}
41
  df = pd.concat([df, pd.DataFrame([new_user])], ignore_index=True)
42
 
43
+ # Ensure column alignment and convert all columns to strings
44
+ df = df[["Name", "Phone", "Email", "Password"]].astype(str)
45
 
46
  # Save back to Excel
47
  try: