File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 4141@register_extension_dtype
4242class BooleanDtype (BaseMaskedDtype ):
4343 """
44- Extension dtype for boolean data.
44+ Extend Boolean data type.
45+
46+ `BooleanDtype` enables use of nullable boolean data in pandas
47+ structures such as`Series`. Internally, it is backed by pandas BooleanArray,
48+ which stores data using two numpy boolean arrays: one to store values('True'/'False')
49+ and a mask to indicate missing values (`pd.NA`)
4550
4651 .. warning::
4752
4853 BooleanDtype is considered experimental. The implementation and
4954 parts of the API may change without warning.
50-
55+
5156 Attributes
5257 ----------
5358 None
5459
5560 Methods
5661 -------
57- None
62+ __from_arrow__(array)
63+ Construct BooleanArray from pyarrow Array/ChunkedArray.
5864
5965 See Also
6066 --------
6167 StringDtype : Extension dtype for string data.
68+ BooleanArray: Array of boolean (True/False) data with missing values.
69+ BaseMaskedDType: Base class for dtypes for BaseMaskedArray subclasses.
6270
6371 Examples
6472 --------
73+ Creating a Boolean series with missing values:
74+
75+ >>> pd.Series([True, False, pd.NA], dtype="boolean")
76+ 0 True
77+ 1 False
78+ 2 <NA>
79+ dtype: boolean
80+
81+ Constructing a BooleanDType directly:
82+
6583 >>> pd.BooleanDtype()
6684 BooleanDtype
6785 """
You can’t perform that action at this time.
0 commit comments