Created
July 24, 2020 15:35
-
-
Save fyyying/11f189a21f947cca42a0b5c2a59d89b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark.sql.types import StructType | |
# Create an empty DataFrame with empty schema | |
schema = StructType([]) | |
spark.createDataFrame(spark.sparkContext.emptyRDD(), schema) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment