The `createDataFrame` method in Python's `pyspark.sql.SparkSession` class is used to create a DataFrame in Apache Spark. It allows us to create a DataFrame from various data sources such as lists, pandas DataFrames, RDDs, and external data sources. This method takes the data source, schema, and optional parameters as inputs and returns a DataFrame. By using this method, we can easily convert data from different sources into a structured and distributed DataFrame, enabling us to perform complex data manipulations and analysis using the powerful Spark SQL engine.
Python SparkSession.createDataFrame - 31 examples found. These are the top rated real world Python examples of pyspark.sql.SparkSession.createDataFrame extracted from open source projects. You can rate examples to help us improve the quality of examples.