pandas.api.extensions.ExtensionArray._from_sequence_of_strings — pandas 2.2.3 documentation (original) (raw)
classmethod ExtensionArray._from_sequence_of_strings(strings, *, dtype=None, copy=False)[source]#
Construct a new ExtensionArray from a sequence of strings.
Parameters:
stringsSequence
Each element will be an instance of the scalar type for this array, cls.dtype.type
.
dtypedtype, optional
Construct for this particular dtype. This should be a Dtype compatible with the ExtensionArray.
copybool, default False
If True, copy the underlying data.
Returns:
ExtensionArray
Examples
pd.arrays.IntegerArray._from_sequence_of_strings(["1", "2", "3"]) [1, 2, 3] Length: 3, dtype: Int64