import pyspark.sql.functions as F
file_list = [ i.path for i in dbutils.fs.ls("/location/01/01/01/01/") ]
df = spark.read.json(file_list)
test_df = df.select(F.col('card_1.card_type'))
test_df.show()
我收到此錯誤訊息
Column 'card_1.card_type' does not exist. Did you mean one of the following? [card_1.card_type, card_1.name, ... ]
誰能告訴如何解決這個問題?
uj5u.com熱心網友回復:
我認為添加反引號 ` 將解決您的問題:
test_df = df.select(F.col('`card_1.card_type`'))
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/486896.html
