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

Solution: Import the 'Bucketizer' module

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

from pyspark.ml.feature import Bucketizer

 

For more information:
Python pyspark Bucketizer