Spaces:
Running
Running
ensure "year" column is integer (no commas)
Browse files
app.py
CHANGED
@@ -32,6 +32,10 @@ def get_data():
|
|
32 |
FROM survey_info;
|
33 |
""", conn)
|
34 |
conn.close()
|
|
|
|
|
|
|
|
|
35 |
return df_
|
36 |
|
37 |
df = get_data()
|
|
|
32 |
FROM survey_info;
|
33 |
""", conn)
|
34 |
conn.close()
|
35 |
+
|
36 |
+
# Ensure year column is int, show blank instead of NaN
|
37 |
+
if "year" in df_.columns:
|
38 |
+
df_["year"] = pd.to_numeric(df_["year"], errors="coerce").astype("Int64")
|
39 |
return df_
|
40 |
|
41 |
df = get_data()
|