Error: AttributeError: 'DataFrame' object has no attribute '_jdf'

前端 未结 2 1983
余生分开走
余生分开走 2021-02-20 02:08

I want to perform k-fold cross validation using pyspark to finetune the parameters and I\'m using pyspark.ml. I am getting Attribute Error.

AttributeError: \'DataFrame\'

2条回答
  •  悲哀的现实
    2021-02-20 02:59

    Convert Panadas to Spark

    from pyspark.sql import SQLContext
    sc = SparkContext.getOrCreate()
    sqlContext = SQLContext(sc)
    
    spark_dff = sqlContext.createDataFrame(panada_df)
    

提交回复
热议问题