-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
StringArray comparisions return BooleanArray #30231
Changes from 1 commit
c548c67
f4ed269
240c6ee
b9bd131
3528654
5a860e1
cc22ff6
e3b10ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,11 +94,12 @@ l. For ``StringDtype``, :ref:`string accessor methods<api.series.str>` | |
2. Some string methods, like :meth:`Series.str.decode` are not available | ||
on ``StringArray`` because ``StringArray`` only holds strings, not | ||
bytes. | ||
3. In comparision operations, :class:`StringArray` and ``Series`` backed | ||
by a ``StringArray`` will return an object with :class:`BooleanDtype`, | ||
rather than a ``bool`` or ``object`` dtype object, depending on whether | ||
there are missing values. | ||
|
||
3. In comparision operations, :class:`arrays.StringArray` and ``Series`` backed | ||
by a ``StringArray`` will return an object with :class:`arrays.BooleanDtype`, | ||
rather than a ``bool`` dtype object, depending on whether | ||
there are missing values. Missing values in a ``StringArray`` will propagate | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a reason we are not always returning a BooleanArray, or am I mis-reading this? this would be very confusing if this is indeed the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is stated confusingly. When the dtype is "string" (not object), comparisons always return BooleanDtype. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
in comparision operations, rather than always comparing unequal like | ||
:attr:`numpy.nan`. | ||
|
||
Everything else that follows in the rest of this document applies equally to | ||
``string`` and ``object`` dtype. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.