Skip to content

Commit

Permalink
docs(python): Improve deprecation message of dtype_if_empty param (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 29, 2024
1 parent 7e4e1ab commit ee97eb8
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit ee97eb8

Please sign in to comment.