df1 = df。selectExpr(“鑄(值作為字符串)”)
{“pNum”:“阿”,“從”:“電信”、“有效載荷”:{“目標”:“1”,“國家”:“印度”、“EMAIL.1”:“(電子郵件保護)”、“PHONE.1 ": " 1122334455 "}}
df2 = df1。選擇(get_json_object (df1(“價值”),“.pNum美元”).alias (“pNum”), get_json_object (df1(“價值”),“從今以後美元”).alias(“的”),get_json_object (df1(“價值”),“.payload.TARGET美元”).alias(“目標”),get_json_object (df1(“價值”),“.payload.COUNTRY美元”).alias(“中國”),get_json_object (df1(“價值”),“.payload.EMAIL.1美元”).alias(電子郵件),get_json_object (df1(“價值”),“.payload.PHONE.1美元”).alias('電話'))
那麼如何處理這種類型的列名字? ?