Description
Failed example: with tempfile.TemporaryDirectory() as d: # Write a DataFrame into a JSON file spark.createDataFrame( [{"age": 100, "name": "Hyukjin Kwon"}] ).write.mode("overwrite").format("json").save(d) # Read the JSON file as a DataFrame. spark.read.format('json').load(d).show() Expected: +---+------------+ |age| name| +---+------------+ |100|Hyukjin Kwon| +---+------------+ Got: +---+------------+ | _1| _2| +---+------------+ |100|Hyukjin Kwon| +---+------------+
Attachments
Issue Links
- relates to
-
SPARK-41745 SparkSession.createDataFrame does not respect the column names in the row
- Resolved
- links to