Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()]
|
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}")
|