Reverted to pre-pandas change

new code was not compatible