Skip to content

Commit

Permalink
docs: add time unit nanoseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
marenwestermann committed May 5, 2024
1 parent 34b0d10 commit f8d62aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py-polars/polars/functions/as_datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def datetime_(
... })
>>> df = df.with_columns(pl.col('start').str.to_datetime(time_unit='ns'))
>>> df = df.with_columns(pl.col('end').str.to_datetime(time_unit='ns'))
>>> df.filter(pl.col("end") > pl.datetime(2024, 6, 1))
>>> df.filter(pl.col("end") > pl.datetime(2024, 6, 1, time_unit="ns"))
shape: (2, 2)
┌───────────────────────────────┬───────────────────────────────┐
│ start ┆ end │
Expand Down

0 comments on commit f8d62aa

Please sign in to comment.