Revised pdas.py to speedup identify_ functions.