Thanks so much for the update and the follow-up from both of you!
First off, let me say that I have figured out how to get smaller already-split-up files output from my source software, so I actually no longer really need the script.
That said, I really appreciate your work, and I know how unsatisfying it is to have code that just doesn’t work as you expect it to. So I did try your newest scripts and wanted to let you know the results anyway.
haolesurferdude: I ran your most recent script but took Yvan’s suggestion about the substitution. This time, when I ran it, it ran for about 6 minutes and made a “Levels.csv” and a “Targets.csv” then it threw an error:
error “Can’t get item 1 of {}.” number -1728 from item 1 of {}
Yvan Koenig: I ran your script and it has really got my MacBook Pro cooking with the fans running on high for the last 8 minutes. I have to step away from the computer now, but I’ll leave it running. So far no new files have been created.
If you guys want to test it yourself on the real file, I’ve uploaded a sample to here: https://dl.dropboxusercontent.com/u/1378250/main.csv
Like I said at the beginning, I am actually moving forward with a different solution, so I don’t need any follow-up on this, but if you want to get it solved for the future readers of this post, go for it!