How can I append a csv file with new information without overwritting the existing results? I tried but it overwrites:
def save_jobs_to_excel(jobs_list, filename):
path=r'\Users\Alberto\OneDrive\Documents\Big Data\pirple\jobs'
jobs = pd.DataFrame(jobs_list)
if filename not in path:
jobs.to_csv(os.path.join(path,f'{filename}.csv'))
elif filename in path:
with open(filename,'a') as f:
f.write(jobs.to_csv(os.path.join(path,f'{filename}.csv')))
else:
pass