How to Solve NameError: name 'Vectors' is not defined -- pyspark

Solution: Import the 'Vectors' module

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

from pyspark.ml.linalg import Vectors

 

For more information:
Python pyspark Vectors