speed up pandas calculation

Skip Montanaro skip.montanaro at gmail.com
Thu Jul 31 04:24:50 CEST 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