QuestionQ232Verified/Developing Apache Spark™ DataFrame/DataSet API ApplicationsCopy linkReport a problemAsk AstroTutorSave questionWhich of these code blocks prints the schema for the DataFrame storesDF?Aprint(storesDF)BstoresDF.printSchema()Cprint(storesDF.schema())DstoresDF.schemaEstoresDF.schema()Show AnswerAnswerExplanationDataFrame.printSchema() prints a PySpark DataFrame’s schema in tree format. The schema member is a property that returns a StructType; it is not a callable method. PySpark DataFrame.printSchema documentationLearn morePySpark DataFrame.printSchemaPySpark DataFrame.schemaShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion