Skip to content

Commit 17b20d2

Browse files
DOC: Enhance BooleanDtype docstring (#62890)
Co-authored-by: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com>
1 parent af63a1c commit 17b20d2

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

pandas/core/arrays/boolean.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ class BooleanDtype(BaseMaskedDtype):
4545
"""
4646
Extension dtype for boolean data.
4747
48+
This is a pandas Extension dtype for boolean data with support for
49+
missing values. BooleanDtype is the dtype companion to :class:`.BooleanArray`,
50+
which implements Kleene logic (sometimes called three-value logic) for
51+
logical operations. See :ref:`boolean.kleene` for more.
52+
4853
.. warning::
4954
50-
BooleanDtype is considered experimental. The implementation and
51-
parts of the API may change without warning.
55+
BooleanDtype is considered experimental. The implementation and
56+
parts of the API may change without warning.
5257
5358
Attributes
5459
----------
@@ -60,12 +65,24 @@ class BooleanDtype(BaseMaskedDtype):
6065
6166
See Also
6267
--------
68+
arrays.BooleanArray : Array of boolean (True/False) data with missing values.
69+
Int64Dtype : Extension dtype for int64 integer data.
6370
StringDtype : Extension dtype for string data.
6471
6572
Examples
6673
--------
6774
>>> pd.BooleanDtype()
6875
BooleanDtype
76+
77+
>>> pd.array([True, False, None], dtype=pd.BooleanDtype())
78+
<BooleanArray>
79+
[True, False, <NA>]
80+
Length: 3, dtype: boolean
81+
82+
>>> pd.array([True, False, None], dtype="boolean")
83+
<BooleanArray>
84+
[True, False, <NA>]
85+
Length: 3, dtype: boolean
6986
"""
7087

7188
name: ClassVar[str] = "boolean"

0 commit comments

Comments
 (0)