MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / write_csv

Function write_csv

eval_code/recons/utils/messages.py:51–61  ·  view source on GitHub ↗
(file_path: str, data_dict: dict)

Source from the content-addressed store, hash-verified

49 return df
50
51def write_csv(file_path: str, data_dict: dict):
52 # transform data of one row to DataFrame
53 new_row = pd.DataFrame([data_dict])
54
55 # directly save when the file does not exist; else we just append
56 if not osp.isfile(file_path):
57 new_row.to_csv(file_path, index=False)
58 else:
59 existing_data = pd.read_csv(file_path)
60 updated_data = pd.concat([existing_data, new_row], ignore_index=True)
61 updated_data.to_csv(file_path, index=False)
62
63def format_matrix_str(matrix):
64 def format_float(num, total_width=20, decimal_places=12):

Callers 8

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected