You already did import numpy. I don't think it is necessary to import it again. (maybe you can just do in the beginning of the document both import of pandas and numpy)