I have the following dataframe in PySpark (Databricks). How can I extract the exact literal timestamp as displayed in the dataframe into a string?. At the moment, using the code below, I get: "2022-02-25 06:32:29" instead of "2022-02-25T06:32:29.000+0000". some conversion is happening that strips of the milliseonds part including the 'T'. I want to retain the literal string as it appears on the dataframe?
code:
table = [x["ts"] for x in ts.rdd.collect()]
for row in table:
print(row)
