Home > other > Python regularly read and write files previous line repeated 2945 more times
Python regularly read and write files previous line repeated 2945 more times
Time:09-15
I want to read a CSV file every 10 seconds, and then to modify a status symbol, and then write the file back to the CSV file, the file has other module in written)
Maybe because I next time this time I read, write, the content of the error hint I recursionerror: maximum recursion the depth exceeded the while calling a python object
How to solve this problem, don't read and write with the other methods to modify status flag?
Code is offline, is roughly like this:
Def timetask () : A=pd. Read_csv (' path ') A [' flag ']=1 A.t o_csv (' path) Threading. The timer (10, timetask (), ()). The start ()
Threading. The timer (10, timetask (), ()). The start ()