myshirk commited on
Commit
e3e81aa
·
verified ·
1 Parent(s): 5274b44

ensure "year" column is integer (no commas)

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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()