How to Solve NameError: name 'pearsonr' is not defined -- scipy

Solution: Import the 'pearsonr' module

To Solve the error, add the following line to the top of your code.

from scipy import pearsonr

 

For more information:
Python scipy pearsonr