loc unable to get numrows from result