Skip to content

Commit

Permalink
docs(python): Fix references to old methods in lazy docstring (#18178)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie authored Aug 14, 2024
1 parent a478cf3 commit c6cb8be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
12 changes: 5 additions & 7 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -8581,17 +8581,15 @@ def lazy(self) -> LazyFrame:
"""
Start a lazy query from this point. This returns a `LazyFrame` object.
Operations on a `LazyFrame` are not executed until this is requested by either
calling:
Operations on a `LazyFrame` are not executed until this is triggered
by calling one of:
* :meth:`.collect() <polars.LazyFrame.collect>`
(run on all data)
* :meth:`.describe_plan() <polars.LazyFrame.describe_plan>`
(print unoptimized query plan)
* :meth:`.describe_optimized_plan() <polars.LazyFrame.describe_optimized_plan>`
(print optimized query plan)
* :meth:`.explain() <polars.LazyFrame.explain>`
(print the query plan)
* :meth:`.show_graph() <polars.LazyFrame.show_graph>`
(show (un)optimized query plan as graphviz graph)
(show the query plan as graphviz graph)
* :meth:`.collect_schema() <polars.LazyFrame.collect_schema>`
(return the final frame schema)
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,7 @@ def lazy(self) -> LazyFrame:
Return lazy representation, i.e. itself.
Useful for writing code that expects either a :class:`DataFrame` or
:class:`LazyFrame`.
:class:`LazyFrame`. On LazyFrame this is a no-op, and returns the same object.
Returns
-------
Expand Down
7 changes: 4 additions & 3 deletions py-polars/tests/unit/datatypes/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2294,12 +2294,13 @@ def test_weekday_vs_stdlib_datetime(
) -> None:
result = (
pl.Series([value], dtype=pl.Datetime(time_unit))
.dt.replace_time_zone(time_zone)
.dt.replace_time_zone(time_zone, non_existent="null")
.dt.weekday()
.item()
)
expected = value.isoweekday()
assert result == expected
if result is not None:
expected = value.isoweekday()
assert result == expected


@given(
Expand Down

0 comments on commit c6cb8be

Please sign in to comment.