rairo commited on
Commit
9cc35d1
·
verified ·
1 Parent(s): 5d021f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -16,10 +16,12 @@ model = genai.GenerativeModel('gemini-2.0-flash-thinking-exp')
16
  def clean_column_name(col_name):
17
  """Clean column names to be compatible with Arrow"""
18
  cleaned = re.sub(r"[^\w\s]", " ", str(col_name).lower())
19
- cleaned = re.sub(r"\s+", "_", cleaned.strip())
20
  # Preserve currency indicators
21
- if "usd" in cleaned: return cleaned.replace("usd", "_usd")
22
- if "zw" in cleaned: return cleaned.replace("zw", "_zw")
 
 
23
  return cleaned
24
 
25
  def clean_tin_value(val):
 
16
  def clean_column_name(col_name):
17
  """Clean column names to be compatible with Arrow"""
18
  cleaned = re.sub(r"[^\w\s]", " ", str(col_name).lower())
19
+ cleaned = re.sub(r"\s+", "_", cleaned.strip())
20
  # Preserve currency indicators
21
+ if "usd" in cleaned:
22
+ return cleaned.replace("usd", "_usd")
23
+ if "zw" in cleaned:
24
+ return cleaned.replace("zw", "_zw")
25
  return cleaned
26
 
27
  def clean_tin_value(val):