I have a question, I have been given the list. I have to find the number of occurecnces for each of the number,ex 1 is repeated 6 times. I am trying to use the dataframe for the same but I am not able to resolve it. I am attaching the code as well as the error. Please help me to resolve this issue.
from pyspark.sql import Row
from pyspark.sql.types import StructType
from pyspark.sql.types import StructField
from pyspark.sql.types import StringType
from pyspark.sql.types import IntegerType
ERROR :- ValueError: Unexpected tuple ‘1’ with StructType