speed up pandas calculation

Skip Montanaro skip.montanaro at gmail.com
Wed Jul 30 22:24:50 EDT 2014


(Now that I'm on a real keyboard, more complete responses are a bit easier.)

Regarding the issue of missing columns from keep_col, you could create
sets of what you have and what you want, and toss the rest:

toss_these = list(set(df.columns) - set(keep_col))
del df[toss_these]

Or something to that effect.

Skip



More information about the Python-list mailing list