I want to adding new records into alldata
file by concat newdata
to it. Somehow the alldata get wiped out after each cycle. Can you please help to fix?
import schedule;import sched;import pandas as pd;
alldata=pd.DataFrame()
def myfunc(outside_file):
newdata = pd.DataFrame({'id':['A', 'c'],
'value': [20, 0]},
)
print(newdata)
outside_file =pd.concat([outside_file,newdata])
print(outside_file)
schedule.every().minute.at(':00').do(myfunc, alldata)
while True:
schedule.run_pending()
print(alldata)
time.sleep(30)