pandas.api.extensions.ExtensionArray._from_sequence#
- classmethod ExtensionArray._from_sequence(scalars, *, dtype=None, copy=False)[source]#
- Construct a new ExtensionArray from a sequence of scalars. - Parameters:
- scalarsSequence
- Each element will be an instance of the scalar type for this array, - cls.dtype.typeor be converted into this type in this method.
- 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([4, 5]) <IntegerArray> [4, 5] Length: 2, dtype: Int64