How to Solve NameError: name 'g2pk' is not defined

Solution: Import the 'g2pk' module

# Add the following line to the top of your code
import g2pk

 

For more information:
Python g2pk