Skip to content

Commit c966562

Browse files
committed
update doc string
1 parent af0bf4d commit c966562

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pandas/core/arrays/string_.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,9 @@ class StringArray(PandasArray):
164164
['1', '1']
165165
Length: 2, dtype: string
166166
167-
On the other hand, instantiating StringArrays directly with non-strings will
168-
raise an error:
167+
However, instantiating StringArrays directly with non-strings will raise an error.
169168
170-
>>> pd.arrays.StringArray(np.array([1, 2]))
171-
Traceback (most recent call last)
172-
ValueError: StringArray requires a sequence of strings or pandas.NA
173-
174-
For comparison methods, this returns a :class:`pandas.BooleanArray`
169+
For comparison methods, `StringArray` returns a :class:`pandas.BooleanArray`:
175170
176171
>>> pd.array(["a", None, "c"], dtype="string") == "a"
177172
<BooleanArray>

0 commit comments

Comments
 (0)