Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(python): Add a few versionadded tags, and add is_column_selection to the Expr meta docs #16590

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion py-polars/docs/source/reference/expressions/meta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ The following methods are available under the `expr.meta` attribute.

Expr.meta.eq
Expr.meta.has_multiple_outputs
Expr.meta.is_column_selection
Expr.meta.is_regex_projection
Expr.meta.ne
Expr.meta.output_name
Expr.meta.pop
Expr.meta.tree_format
Expr.meta.root_names
Expr.meta.serialize
Expr.meta.tree_format
Expr.meta.undo_aliases
Expr.meta.write_json
6 changes: 5 additions & 1 deletion py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ def deserialize(cls, source: str | Path | IOBase) -> Self:
"""
Read a serialized DataFrame from a file.

.. versionadded:: 0.20.31

Parameters
----------
source
Expand Down Expand Up @@ -2224,6 +2226,8 @@ def serialize(self, file: IOBase | str | Path | None = None) -> str | None:
"""
Serialize this DataFrame to a file or string in JSON format.

.. versionadded:: 0.20.31

Parameters
----------
file
Expand Down Expand Up @@ -3427,7 +3431,7 @@ def write_database(
"""
Write the data in a Polars DataFrame to a database.

.. versionchanged:: 0.20.26
.. versionadded:: 0.20.26
Support for instantiated connection objects in addition to URI strings, and
a new `engine_options` parameter.

Expand Down
2 changes: 2 additions & 0 deletions py-polars/polars/expr/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ def with_fields(

This is similar to `with_columns` on `DataFrame`.

.. versionadded:: 0.20.27

Examples
--------
>>> df = pl.DataFrame(
Expand Down
6 changes: 3 additions & 3 deletions py-polars/polars/io/spreadsheet/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ def read_excel(
"""
Read Excel spreadsheet data into a DataFrame.

.. versionchanged:: 0.20.6
.. versionadded:: 0.20.6
Added "calamine" fastexcel engine for Excel Workbooks (.xlsx, .xlsb, .xls).
.. versionchanged:: 0.19.4
.. versionadded:: 0.19.4
Added "pyxlsb" engine for Excel Binary Workbooks (.xlsb).
.. versionchanged:: 0.19.3
.. versionadded:: 0.19.3
Added "openpyxl" engine, and added `schema_overrides` parameter.

Parameters
Expand Down
5 changes: 4 additions & 1 deletion py-polars/polars/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def expand_selector(
"""
Expand selector to column names, with respect to a specific frame or target schema.

.. versionchanged:: 0.20.30
.. versionadded:: 0.20.30
The `strict` parameter was added.

Parameters
Expand Down Expand Up @@ -1002,6 +1002,9 @@ def by_name(*names: str | Collection[str], require_all: bool = True) -> Selector
"""
Select all columns matching the given names.

.. versionadded:: 0.20.27
The `require_all` parameter was added.

Parameters
----------
*names
Expand Down