Convert StringType to ArrayType in PySpark
问题 I am trying to Run the FPGrowth algorithm in PySpark on my Dataset. from pyspark.ml.fpm import FPGrowth fpGrowth = FPGrowth(itemsCol="name", minSupport=0.5,minConfidence=0.6) model = fpGrowth.fit(df) I am getting the following error: An error occurred while calling o2139.fit. : java.lang.IllegalArgumentException: requirement failed: The input column must be ArrayType, but got StringType. at scala.Predef$.require(Predef.scala:224) My Dataframe df is in the form: df.show(2) +---+---------+-----