What does “ Classification labels should be in [0 to 9]” mean when calling logistic.fit(dataset)

Solution for What does “ Classification labels should be in [0 to 9]” mean when calling logistic.fit(dataset)
is Given Below:

I am getting this error when I run my pyspark program using spark-submit in the terminal

Traceback (most recent call last):
File “/Users/arushimadan/PycharmProjects/PysparkTest/CollegeData.py”, line 35, in
logistic.fit(people_train)
File “/usr/local/Cellar/apache-spark/3.1.1/libexec/python/lib/pyspark.zip/pyspark/ml/base.py”, line 161, in fit
File “/usr/local/Cellar/apache-spark/3.1.1/libexec/python/lib/pyspark.zip/pyspark/ml/wrapper.py”, line 335, in _fit
File “/usr/local/Cellar/apache-spark/3.1.1/libexec/python/lib/pyspark.zip/pyspark/ml/wrapper.py”, line 332, in _fit_java
File “/usr/local/Cellar/apache-spark/3.1.1/libexec/python/lib/py4j-0.10.9-src.zip/py4j/java_gateway.py”, line 1304, in call
File “/usr/local/Cellar/apache-spark/3.1.1/libexec/python/lib/pyspark.zip/pyspark/sql/utils.py”, line 111, in deco
File “/usr/local/Cellar/apache-spark/3.1.1/libexec/python/lib/py4j-0.10.9-src.zip/py4j/protocol.py”, line 326, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling o63.fit.
: org.apache.spark.SparkException: Classification labels should be in [0 to 9]. Found 306 invalid labels.

Here are the lines it is erroring at:
logistic = LogisticRegression(labelCol=”CGPA”)
logistic.fit(people_train)

Here is a snapshot of the people_train dataset:
enter image description here

What does this error mean and how do I fix it?