eurekacrew / agents /meta_learning.py
gaur3009's picture
Create meta_learning.py
77139d7 verified
raw
history blame contribute delete
355 Bytes
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)