Initialize evaluation protocols and examples; Implement one kind of eval; Update requirements

This commit is contained in:
Timothyxxx
2023-12-12 18:12:37 +08:00
parent 2ca36109b5
commit a37f8a39e0
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
from .table import compare_table
eval_funcs = {
"compare_table(expected, actual)": compare_table
}

View File

View File

@@ -0,0 +1,14 @@
def compare_table(expected, actual):
import pandas as pd
df1 = pd.read_excel(expected)
df2 = pd.read_excel(actual)
# Compare the DataFrames
return 1 if df1.equals(df2) else 0
if __name__ == '__main__':
path1 = ""
path2 = ""
print(compare_table(path1, path2))