Asmit Nayak commited on
Commit
23fbfee
·
1 Parent(s): 4c8ef47

Update CSV export format to use '|' separator and quote all fields

Browse files
Files changed (1) hide show
  1. py_files/gemini_analysis.py +2 -2
py_files/gemini_analysis.py CHANGED
@@ -103,7 +103,7 @@ def few_shots_generator(eval_dir='./eval', files=None, api_key=None):
103
  try:
104
  data = pd.read_csv(f, index_col=0)
105
  data.index = data.index.str.replace('|', '', regex=False)
106
- data = data.to_csv()
107
  print(f"[CONSOLE] Data loaded and converted to CSV format")
108
  except Exception as e:
109
  print(f"[CONSOLE] Failed to read the file: {f}, error: {e}")
@@ -304,7 +304,7 @@ def thinking_generator(eval_dir="./eval", files=None, api_key=None):
304
  try:
305
  data = pd.read_csv(f, index_col=0)
306
  data.index = data.index.str.replace('|', '', regex=False)
307
- data = data.to_csv()
308
  print(f"[CONSOLE] Data prepared for thinking analysis")
309
 
310
  # Make API call to Gemini with retry logic for thinking analysis
 
103
  try:
104
  data = pd.read_csv(f, index_col=0)
105
  data.index = data.index.str.replace('|', '', regex=False)
106
+ data = data.to_csv(sep="|", quoting=csv.QUOTE_ALL)
107
  print(f"[CONSOLE] Data loaded and converted to CSV format")
108
  except Exception as e:
109
  print(f"[CONSOLE] Failed to read the file: {f}, error: {e}")
 
304
  try:
305
  data = pd.read_csv(f, index_col=0)
306
  data.index = data.index.str.replace('|', '', regex=False)
307
+ data = data.to_csv(sep="|", quoting=csv.QUOTE_ALL)
308
  print(f"[CONSOLE] Data prepared for thinking analysis")
309
 
310
  # Make API call to Gemini with retry logic for thinking analysis