lol, I'm not even going to try. I almost always miss the Python and R questions. lol
Heh... ditto that. My "correct" answer would be "Why are you doing this in Python instead of SQL Serve"r?
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row. First step towards the paradigm shift of writing Set Based code: ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
"Change is inevitable... change for the better is not".
"If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?" Helpful Links: How to post code problems How to Post Performance Problems Create a Tally Function (fnTally)