Skip to content

Commit 5f3a3c6

Browse files
committed
add issue number
1 parent 31b6524 commit 5f3a3c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/source/whatsnew/v1.2.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Deprecations
205205
Performance improvements
206206
~~~~~~~~~~~~~~~~~~~~~~~~
207207

208-
- Performance improvements when creating Series with dtype `str` or :class:`StringDtype` from array with many string elements (:issue:`36304`)
208+
- Performance improvements when creating Series with dtype `str` or :class:`StringDtype` from array with many string elements (:issue:`36304`, :issue:`36325`)
209209
- Performance improvement in :meth:`GroupBy.agg` with the ``numba`` engine (:issue:`35759`)
210210
-
211211

pandas/core/arrays/string_.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ class StringArray(PandasArray):
165165
['1', '1']
166166
Length: 2, dtype: string
167167
168-
Instantiating StringArrays directly with non-strings will raise an error unless
169-
``convert=True``.
168+
Instantiating StringArrays directly with non-strings arrays will raise an error
169+
unless ``convert=True``.
170170
171-
>>> pd.arrays.StringArray(['1', 1])
172-
TypeError: Argument 'values' has incorrect type (expected numpy.ndarray, got list)
171+
>>> pd.arrays.StringArray(np.array(['1', 1], dtype=object))
172+
ValueError: StringArray requires a sequence of strings or pandas.NA
173173
>>> pd.arrays.StringArray(['1', 1], convert=True)
174174
<StringArray>
175175
['1', '1']

0 commit comments

Comments
 (0)