Skip to content

Commit

Permalink
docs(python): Fix time unit in timestamp example (pola-rs#15281)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrumiller authored Mar 25, 2024
1 parent 59c59ce commit 8f616b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py-polars/polars/expr/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1434,12 +1434,12 @@ def timestamp(self, time_unit: TimeUnit = "us") -> Expr:
... .to_frame()
... )
>>> df.with_columns(
... pl.col("date").dt.timestamp().alias("timestamp_ns"),
... pl.col("date").dt.timestamp().alias("timestamp_us"),
... pl.col("date").dt.timestamp("ms").alias("timestamp_ms"),
... )
shape: (3, 3)
┌────────────┬─────────────────┬──────────────┐
│ date ┆ timestamp_ns ┆ timestamp_ms │
│ date ┆ timestamp_us ┆ timestamp_ms │
│ --- ┆ --- ┆ --- │
│ date ┆ i64 ┆ i64 │
╞════════════╪═════════════════╪══════════════╡
Expand Down

0 comments on commit 8f616b8

Please sign in to comment.