The title. I am iterating through a very large csv file using Selenium and I want to append the results to a different csv file and I am using df.to_csv to do so. It works fine for some time but once I start to do something else and leave my Python program in the background, the csv file stops saving. The for loop keeps running though and I am assuming it is doing its job. When I go back to the python code, and just hover for a second or two, the csv file starts saving again.
I looked at the other solutions with some users suggesting .flush(), but that is when you are storing the csv file in a variable, which I am not in this case. I couldn’t find a solution where I could potentially flush for the append to csv function.
1