I have written a python code to process a big .csv file. It takes a day for the code to finish running. So I tested it on a small portion of the .csv file and it works fine. However, every time I run it on the actual big data, after a few hours it fails because of an error. Each time the error occurs in a different part in the code.
Assume my code looks like this:
def function_one(data_1):
do something with data_1
def function_two(data_2):
do something with data_2
def function_three(data_3):
do something with data_3
And I run this through a main function in a separate file. How can I make python 3 to pause and switch to a debugging mode whenever there is an error so I can fix the code? It'll be great if there is way that I fix the bug and continue running.