I am using the below code in a for loop, the problem is whenever a new loop starts, a new csv is formed that means deleting the previous entries. I want that the entries get appended. I can do it using csv write but would be nice to know using pandas.
prediction.to_csv("tmp.csv" , sep='\t', encoding='utf-8', doublequote=False, index=False)