Spaces:
Runtime error
Runtime error
File size: 355 Bytes
77139d7 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import pandas as pd
import os
def log(hypothesis, result):
path = "data/log.csv"
if os.path.exists(path):
df = pd.read_csv(path)
else:
df = pd.DataFrame(columns=['hypothesis','result'])
df = pd.concat([df, pd.DataFrame({'hypothesis':[hypothesis],'result':[result]})])
df.to_csv(path, index=False)
return df.tail(5) |