Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/17865#discussion_r123184878
--- Diff: python/pyspark/sql/functions.py ---
@@ -1073,12 +1109,17 @@ def last_day(date):
return Column(sc._jvm.functions.last_day(_to_java_column(date)))
+@ignore_unicode_prefix
@since(1.5)
def from_unixtime(timestamp, format="yyyy-MM-dd HH:mm:ss"):
"""
Converts the number of seconds from unix epoch (1970-01-01 00:00:00
UTC) to a string
representing the timestamp of that moment in the current system time
zone in the given
format.
+
+ >>> time_df = spark.createDataFrame([(1428476400, )], ['unix_time'])
+ >>> time_df.select(from_unixtime('unix_time').alias('ts') ).collect()
--- End diff --
nit: `) )` -> `))`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]