I have the following Pyspark dataframe:
df = spark.sql("select unhex('0A54C9E024AA62F9EF8BE39231782F9240B51CFB82D1CF7586F734EE07B51086') as db_key")
As you can see, it has only one column "db_key" with only one value: the result of performing the operation unhex over this token 0A54C9E024AA62F9EF8BE39231782F9240B51CFB82D1CF7586F734EE07B51086. If I execute display over the previous dataframe, I get the following result:
display(df)
But if I execute show() I get this result:
df.show()
I want to obtain the same string I obtain with display but using show(). I tried casting like this, but the result is not what I want:
df = spark.sql("select cast(unhex('0A54C9E024AA62F9EF8BE39231782F9240B51CFB82D1CF7586F734EE07B51086') AS STRING) as db_key")
df.show()
What can I do?


