We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb8547c commit e693e71Copy full SHA for e693e71
ibis/expr/types/numeric.py
@@ -1082,6 +1082,26 @@ def as_timestamp(
1082
-------
1083
TimestampValue
1084
`self` converted to a timestamp
1085
+
1086
+ Examples
1087
+ --------
1088
+ >>> import ibis
1089
+ >>> ibis.options.interactive = True
1090
+ >>> t = ibis.memtable(
1091
+ ... {
1092
+ ... "int_col": [0, 1730501716, 2147483647],
1093
+ ... }
1094
+ ... )
1095
+ >>> t.int_col.as_timestamp("s")
1096
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
1097
+ ┃ TimestampFromUNIX(int_col, SECOND) ┃
1098
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
1099
+ │ timestamp │
1100
+ ├────────────────────────────────────┤
1101
+ │ 1970-01-01 00:00:00 │
1102
+ │ 2024-11-01 22:55:16 │
1103
+ │ 2038-01-19 03:14:07 │
1104
+ └────────────────────────────────────┘
1105
"""
1106
return ops.TimestampFromUNIX(self, unit).to_expr()
1107
0 commit comments