ouhenio commited on
Commit
f6aacb3
·
verified ·
1 Parent(s): 02a0634

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -100,12 +100,12 @@ def load_include_data():
100
  if os.path.exists("include.csv"):
101
  include_df = pd.read_csv("include.csv")
102
  if "Nombre en Discord / username" in include_df.columns and "Número de preguntas / number of questions" in include_df.columns:
103
- include_dict = {}
104
  for _, row in include_df.iterrows():
105
  username = row["Nombre en Discord / username"]
106
  questions = row["Número de preguntas / number of questions"]
107
  if pd.notna(username) and pd.notna(questions):
108
- include_dict[username.lower()] = int(questions)
109
  return include_dict
110
  except Exception as e:
111
  print(f"Error loading include.csv: {e}")
 
100
  if os.path.exists("include.csv"):
101
  include_df = pd.read_csv("include.csv")
102
  if "Nombre en Discord / username" in include_df.columns and "Número de preguntas / number of questions" in include_df.columns:
103
+ include_dict = defaultdict(int)
104
  for _, row in include_df.iterrows():
105
  username = row["Nombre en Discord / username"]
106
  questions = row["Número de preguntas / number of questions"]
107
  if pd.notna(username) and pd.notna(questions):
108
+ include_dict[username.lower()] += int(questions)
109
  return include_dict
110
  except Exception as e:
111
  print(f"Error loading include.csv: {e}")