MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / process_table

Function process_table

union/TUS/santos_annotation.py:67–77  ·  view source on GitHub ↗
(table, label_dict, type_dict, class_dict, save_file_path)

Source from the content-addressed store, hash-verified

65
66 # 定义处理单个表格的函数
67def process_table(table, label_dict, type_dict, class_dict, save_file_path):
68 table_name = table.rsplit(os.sep, 1)[-1]
69 input_table = pd.read_csv(table, lineterminator='\n', low_memory=False)
70 column_semantic = computeColumnSemantics(input_table, label_dict, type_dict, class_dict)
71 if len(column_semantic) == 0:
72 return
73 saved_data = fill_zero(column_semantic)
74 saved_df = pd.DataFrame(saved_data)
75 saved_file_path = save_file_path + table_name
76 saved_df.to_csv(saved_file_path, index=False)
77 #print("正在处理表格:", table_name)
78
79
80# 定义处理所有表格的主函数

Callers

nothing calls this directly

Calls 2

fill_zeroFunction · 0.90
computeColumnSemanticsFunction · 0.70

Tested by

no test coverage detected