On Wed, Jul 30, 2014 at 8:11 PM, Chris Kaynor <ckay...@zindagigames.com> wrote: > Another way to write this, using a list expression (untested): > new_df = [col for col in df if col.value in keep_col]
As I am learning (often painfully) with pandas and JavaScript+(d3 or jQuery), loops are the enemy. You want to operate on large chunks of data simultaneously. In pandas, those chunks are thinly disguised numpy arrays. In JS+(ds or jQuery), those chunks are selections from the DOM. I should have paid closer attention to the APL unit of my programming languages survey class in college. Skip -- https://mail.python.org/mailman/listinfo/python-list