How to Solve NameError: name 'shuffle' is not defined -- sklearn

Solution: Import the 'shuffle' module

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

from sklearn.utils import shuffle

 

For more information:
Python sklearn shuffle