I’m performing 2 big for loop tasks on a dataframe column. The context being what I’m calling “text corruption”; turning perfectly structured text into text full of both missing punctuation and misspellings, to mimic human errors. I found that running 10,000s rows was extremely slow, even after optimizing the for loops. I discovered a process called Batching, on this post.