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): Improve deprecation message of dtype_if_empty param #14068

Merged
merged 1 commit into from
Jan 29, 2024
Merged
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
8 changes: 4 additions & 4 deletions py-polars/polars/series/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ class Series:
Data type of the Series if `values` contains no non-null data.

.. deprecated:: 0.20.6
The data type for empty Series will always be Null.
To preserve behavior, check if the resulting Series has data type Null and
cast to the desired data type.
The data type for empty Series will always be `Null`, unless `dtype` is
specified. To preserve behavior, check if the resulting Series has data type
`Null` and cast to the desired data type.
This parameter will be removed in the next breaking release.

Examples
Expand Down Expand Up @@ -263,7 +263,7 @@ def __init__(
if dtype_if_empty != Null:
issue_deprecation_warning(
"The `dtype_if_empty` parameter for the Series constructor is deprecated."
" The data type for empty Series will always be Null."
" The data type for empty Series will always be Null, unless `dtype` is specified."
" To preserve behavior, check if the resulting Series has data type Null and cast to the desired data type."
" This parameter will be removed in the next breaking release.",
version="0.20.6",
Expand Down
Loading